diff options
Diffstat (limited to 'icons-mkdefaultsizes.sh')
-rwxr-xr-x | icons-mkdefaultsizes.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/icons-mkdefaultsizes.sh b/icons-mkdefaultsizes.sh new file mode 100755 index 0000000..6d4b756 --- /dev/null +++ b/icons-mkdefaultsizes.sh | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/bash | ||
2 | # invoke as ./generate.sh FILENAME | ||
3 | # it is used to generate smaller versions from the one found in scalable | ||
4 | |||
5 | FILE=${1#scalable/} | ||
6 | PATH=$(dirname $FILE) | ||
7 | |||
8 | for VERSION in 16x16 32x32 48x48 64x64 128x128 256x256 | ||
9 | do | ||
10 | /bin/mkdir -p "cache/$VERSION/$PATH" | ||
11 | done | ||
12 | |||
13 | echo "$1..." | ||
14 | /usr/bin/convert $1 \ | ||
15 | \( -clone 0 -resize 16x16 -write cache/16x16/$FILE \) \ | ||
16 | \( -clone 0 -resize 32x32 -write cache/32x32/$FILE \) \ | ||
17 | \( -clone 0 -resize 48x48 -write cache/48x48/$FILE \) \ | ||
18 | \( -clone 0 -resize 64x64 -write cache/64x64/$FILE \) \ | ||
19 | \( -clone 0 -resize 128x128 -write cache/128x128/$FILE \) \ | ||
20 | \( -clone 0 -resize 256x256 -write cache/256x256/$FILE \) \ | ||
21 | null: | ||
22 | |||