debug-cidebug-ci-sanitisersfaster-cavernloglog-selectwalls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change
on this file since d938adcc 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
|
Rev | Line | |
---|
[87900bb] | 1 | #!/bin/sh |
---|
| 2 | set -e |
---|
| 3 | |
---|
[5aeb91c] | 4 | inkscape --version > /dev/null || { echo "Error: Inkscape needed to generate macos iconset files"; exit 1; } |
---|
| 5 | |
---|
[87900bb] | 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 |
---|
[c33736c] | 19 | inkscape -w "$r" -h "$r" --export-filename="$tmp/icon_${r}x${r}.png" "$in" |
---|
[87900bb] | 20 | done |
---|
| 21 | for r in 16 128 256 ; do |
---|
| 22 | d=`expr $r + $r` |
---|
[23b7e24] | 23 | ln "$tmp/icon_${d}x${d}.png" "$tmp/icon_${r}x${r}@2x.png" |
---|
[87900bb] | 24 | done |
---|
| 25 | for r in 32 512 ; do |
---|
| 26 | d=`expr $r + $r` |
---|
[c33736c] | 27 | inkscape -w "$d" -h "$d" --export-filename="$tmp/icon_${r}x${r}@2x.png" "$in" |
---|
[87900bb] | 28 | done |
---|
| 29 | rm -f "$out" |
---|
| 30 | zip --move -r "$out" "$tmp" |
---|
Note: See
TracBrowser
for help on using the repository browser.