aboutsummaryrefslogtreecommitdiff
path: root/generate.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate.sh')
-rwxr-xr-xgenerate.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/generate.sh b/generate.sh
new file mode 100755
index 0000000..d1737fb
--- /dev/null
+++ b/generate.sh
@@ -0,0 +1,24 @@
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
6
7FILE=${1#scalable/}
8PATH=$(dirname $FILE)
9
10for VERSION in 16x16 32x32 48x48 64x64 128x128 256x256
11do
12 /bin/mkdir -p "cache/$VERSION/$PATH"
13done
14
15
16/usr/bin/convert $1 \
17 \( -clone 0 -resize 16x16 -write cache/16x16/$FILE \) \
18 \( -clone 0 -resize 32x32 -write cache/32x32/$FILE \) \
19 \( -clone 0 -resize 48x48 -write cache/48x48/$FILE \) \
20 \( -clone 0 -resize 64x64 -write cache/64x64/$FILE \) \
21 \( -clone 0 -resize 128x128 -write cache/128x128/$FILE \) \
22 \( -clone 0 -resize 256x256 -write cache/256x256/$FILE \) \
23 null:
24
..