summaryrefslogtreecommitdiffstats
path: root/gen.sh
blob: 14af53c244c5a6b50aacdb789fbb0dcca5e115f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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