summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-08-04 19:58:05 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2019-08-04 19:58:05 +0200
commitd1fdc75d84619a1bf65ed2239ad8668de8e38705 (patch)
treea84caf77ec58ef07a5937199f1f0a8352d05b230
parentImproved gen script (diff)
downloadblobfox-emojis-d1fdc75d84619a1bf65ed2239ad8668de8e38705.tar.gz
blobfox-emojis-d1fdc75d84619a1bf65ed2239ad8668de8e38705.tar.bz2
blobfox-emojis-d1fdc75d84619a1bf65ed2239ad8668de8e38705.zip
Generate index.json as well
-rwxr-xr-xgen.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/gen.sh b/gen.sh
index cac39d9..df30bd7 100755
--- a/gen.sh
+++ b/gen.sh
@@ -2,6 +2,16 @@
2 2
3FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.svg.png} $x' {} \;` 3FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.svg.png} $x' {} \;`
4 4
5jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<<"${FILELIST%|}">blobfox.json 5jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<< "${FILELIST%|}" > blobfox.json
6 6
7zip blobfox.zip *.png 7zip blobfox.zip *.png
8
9CHECKSUM=`sha256sum -z blobfox.zip | awk '{ print $1 }'`
10
11printf '{
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