summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeuerfuchs <git@feuerfuchs.dev>2019-08-05 21:16:42 +0200
committerFeuerfuchs <git@feuerfuchs.dev>2019-08-05 21:16:42 +0200
commit4d1b7bc84048633edb5fcc915a459d982b28e368 (patch)
tree30c36ba1ef7dbe80393bbeee6996ac7ed8db53d1
parentAdd salad to burger (diff)
downloadblobfox-emojis-4d1b7bc84048633edb5fcc915a459d982b28e368.tar.gz
blobfox-emojis-4d1b7bc84048633edb5fcc915a459d982b28e368.tar.bz2
blobfox-emojis-4d1b7bc84048633edb5fcc915a459d982b28e368.zip
Improved gen script
-rw-r--r--.gitignore4
-rw-r--r--LICENSE13
-rwxr-xr-xgen.sh26
3 files changed, 31 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 6396bb2..d563759 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
1*.png export
2*.json
3*.zip
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..5238b5a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,13 @@
1Copyright 2019 Feuerfuchs <me@feuerfuchs.dev> (https://www.feuerfuchs.dev/)
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
diff --git a/gen.sh b/gen.sh
index 14af53c..543b60a 100755
--- a/gen.sh
+++ b/gen.sh
@@ -1,18 +1,26 @@
1#!/bin/sh 1#!/bin/sh
2 2
3FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.png} $x' {} \;` 3mkdir -p 'export'
4find . -type f -iname '*.svg' -print0 | parallel -0 'x={.}; inkscape -z -e "export/${x#./}.png" "{}"' {} \;
5cp LICENSE export/
6
7cd export
4 8
9FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.png} $x' {} \;`
5jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<< "${FILELIST%|}" > blobfox.json 10jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<< "${FILELIST%|}" > blobfox.json
6 11
7rm blobfox.zip 12rm -f blobfox.zip
8zip blobfox.zip *.png 13zip blobfox.zip *.png
9 14zip blobfox.zip LICENSE
10CHECKSUM=`sha256sum -z blobfox.zip | awk '{ print $1 }'` 15CHECKSUM=`sha256sum -z blobfox.zip | awk '{ print $1 }'`
11 16
12printf '{ 17printf '{
13 "src": "https://git.pleroma.social/pleroma/emoji-index/raw/master/packs/blobfox.zip", 18 "blobfox": {
14 "src_sha256": "%s", 19 "description": "Like Blobcat, but with foxes",
15 "license": "Apache 2.0", 20 "files": "blobfox.json",
16 "files": "blobfox.json", 21 "homepage": "https://www.feuerfuchs.dev/projects/blobfox-emojis/",
17 "description": "Like Blobcat, except with foxes" 22 "src": "https://www.feuerfuchs.dev/projects/blobfox-emojis/blobfox.zip",
18}' $CHECKSUM > index.json 23 "src_sha256": "%s",
24 "license": "Apache 2.0"
25 }
26}' $CHECKSUM > manifest.json