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.

16 lines
419 B

#!/bin/sh
IDS=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s|" ${x%.svg.png}' {} \;`
FILES=`find . -type f -iname '*.png' -exec sh -c 'printf "%s|" ${0#./}' {} \;`
FILELIST="${IDS%|}
${FILES%|}"
jq -Rn '
( input | split("|") ) as $keys |
( inputs | split("|") ) as $vals |
[[$keys, $vals] | transpose[] | {key:.[0],value:.[1]}] | from_entries
' <<<"$FILELIST">blobfox.json
zip blobfox.zip *.png