diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-08-04 19:58:05 +0200 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-08-04 19:58:05 +0200 |
commit | d1fdc75d84619a1bf65ed2239ad8668de8e38705 (patch) | |
tree | a84caf77ec58ef07a5937199f1f0a8352d05b230 | |
parent | Improved gen script (diff) | |
download | blobfox-emojis-d1fdc75d84619a1bf65ed2239ad8668de8e38705.tar.gz blobfox-emojis-d1fdc75d84619a1bf65ed2239ad8668de8e38705.tar.bz2 blobfox-emojis-d1fdc75d84619a1bf65ed2239ad8668de8e38705.zip |
Generate index.json as well
-rwxr-xr-x | gen.sh | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -2,6 +2,16 @@ | |||
2 | 2 | ||
3 | FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.svg.png} $x' {} \;` | 3 | FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.svg.png} $x' {} \;` |
4 | 4 | ||
5 | jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<<"${FILELIST%|}">blobfox.json | 5 | jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<< "${FILELIST%|}" > blobfox.json |
6 | 6 | ||
7 | zip blobfox.zip *.png | 7 | zip blobfox.zip *.png |
8 | |||
9 | CHECKSUM=`sha256sum -z blobfox.zip | awk '{ print $1 }'` | ||
10 | |||
11 | printf '{ | ||
12 | "src": "https://git.pleroma.social/pleroma/emoji-index/raw/master/packs/blobfox.zip", | ||
13 | "src_sha256": "%s", | ||
14 | "license": "Apache 2.0", | ||
15 | "files": "blobfox.json", | ||
16 | "description": "Like Blobcat, except with foxes" | ||
17 | }' $CHECKSUM > index.json | ||