You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
615 B

#!/bin/sh
FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.png} $x' {} \;`
jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<< "${FILELIST%|}" > blobfox.json
rm blobfox.zip
zip blobfox.zip *.png
CHECKSUM=`sha256sum -z blobfox.zip | awk '{ print $1 }'`
printf '{
"src": "https://git.pleroma.social/pleroma/emoji-index/raw/master/packs/blobfox.zip",
"src_sha256": "%s",
"license": "Apache 2.0",
"files": "blobfox.json",
"description": "Like Blobcat, except with foxes"
}' $CHECKSUM > index.json