parent
97a5a1ea71
commit
eee2b7b7a8
@ -1,15 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
IDS=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s|" ${x%.svg.png}' {} \;`
|
FILELIST=`find . -type f -iname '*.png' -exec sh -c 'x=${0#./}; printf "%s:%s|" ${x%.svg.png} $x' {} \;`
|
||||||
FILES=`find . -type f -iname '*.png' -exec sh -c 'printf "%s|" ${0#./}' {} \;`
|
|
||||||
|
|
||||||
FILELIST="${IDS%|}
|
jq -Rn 'input | split("|") | map(split(":") | { key: .[0], value: .[1] }) | from_entries' <<<"${FILELIST%|}">blobfox.json
|
||||||
${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
|
zip blobfox.zip *.png
|
||||||
|
Loading…
Reference in new issue