2018-04-14 20:30:44 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-08-09 22:29:16 +02:00
|
|
|
while read e; do
|
2018-04-14 20:30:44 +02:00
|
|
|
IFS=":"; set $e
|
|
|
|
|
|
|
|
EXT=`echo $1 | tr /a-z/ /A-Z/`
|
|
|
|
sed -e "s/\$EXTENSION/$EXT/" -e "s/\$COLOR/$2/" icon-template.svg > $1.svg
|
|
|
|
|
|
|
|
ICONSET=$1.iconset
|
|
|
|
mkdir $ICONSET
|
|
|
|
|
2021-05-29 00:22:24 +02:00
|
|
|
rsvg-convert -w 16 -h 16 -o "$ICONSET/icon_16x16.png" "$1.svg"
|
|
|
|
rsvg-convert -w 32 -h 32 -o "$ICONSET/icon_16x16@2x.png" "$1.svg"
|
2018-04-14 20:30:44 +02:00
|
|
|
cp "$ICONSET/icon_16x16@2x.png" "$ICONSET/icon_32x32.png"
|
2021-05-29 00:22:24 +02:00
|
|
|
rsvg-convert -w 64 -h 64 -o "$ICONSET/icon_32x32@2x.png" "$1.svg"
|
|
|
|
rsvg-convert -w 128 -h 128 -o "$ICONSET/icon_128x128.png" "$1.svg"
|
|
|
|
rsvg-convert -w 256 -h 256 -o "$ICONSET/icon_128x128@2x.png" "$1.svg"
|
2018-04-14 20:30:44 +02:00
|
|
|
cp "$ICONSET/icon_128x128@2x.png" "$ICONSET/icon_256x256.png"
|
2021-05-29 00:22:24 +02:00
|
|
|
rsvg-convert -w 512 -h 512 -o "$ICONSET/icon_256x256@2x.png" "$1.svg"
|
2018-04-14 20:30:44 +02:00
|
|
|
cp "$ICONSET/icon_256x256@2x.png" "$ICONSET/icon_512x512.png"
|
2021-05-29 00:22:24 +02:00
|
|
|
rsvg-convert -w 1024 -h 1024 -o "$ICONSET/icon_512x512@2x.png" "$1.svg"
|
2018-04-14 20:30:44 +02:00
|
|
|
|
|
|
|
iconutil -c icns -o $1.icns "$ICONSET"
|
2018-04-14 20:55:39 +02:00
|
|
|
rm -R "$ICONSET" $1.svg
|
2018-08-09 22:29:16 +02:00
|
|
|
done < extensions
|