Last change
on this file was
5aeb91c,
checked in by Olly Betts <olly@…>, 3 years ago
|
svg2iconsetzip: Report missing inkscape clearly
|
-
Property mode set to
100755
|
File size:
676 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | set -e |
---|
3 | |
---|
4 | inkscape --version > /dev/null || { echo "Error: Inkscape needed to generate macos iconset files"; exit 1; } |
---|
5 | |
---|
6 | case $1 in |
---|
7 | -*) in=./$1 ;; |
---|
8 | *) in=$1 ;; |
---|
9 | esac |
---|
10 | case $2 in |
---|
11 | -*) out=./$2 ;; |
---|
12 | *) out=$2 ;; |
---|
13 | esac |
---|
14 | tmp=`echo "$out"|sed 's/\.zip$//'` |
---|
15 | |
---|
16 | rm -rf "$tmp" |
---|
17 | mkdir "$tmp" |
---|
18 | for r in 16 32 128 256 512 ; do |
---|
19 | inkscape -w "$r" -h "$r" --export-filename="$tmp/icon_${r}x${r}.png" "$in" |
---|
20 | done |
---|
21 | for r in 16 128 256 ; do |
---|
22 | d=`expr $r + $r` |
---|
23 | ln "$tmp/icon_${d}x${d}.png" "$tmp/icon_${r}x${r}@2x.png" |
---|
24 | done |
---|
25 | for r in 32 512 ; do |
---|
26 | d=`expr $r + $r` |
---|
27 | inkscape -w "$d" -h "$d" --export-filename="$tmp/icon_${r}x${r}@2x.png" "$in" |
---|
28 | done |
---|
29 | rm -f "$out" |
---|
30 | zip --move -r "$out" "$tmp" |
---|
Note: See
TracBrowser
for help on using the repository browser.