source: git/lib/icons/png2iconsetzip @ 5d4e21e

debug-cidebug-ci-sanitiserswalls-data debian/1.4.1-1
Last change on this file since 5d4e21e was 9fcb59d, checked in by Olly Betts <olly@…>, 9 years ago

lib/icons/: Rename helper scripts to match the names used in
Makefile.am.

  • Property mode set to 100755
File size: 540 bytes
Line 
1#!/bin/sh
2set -e
3
4case $1 in
5  -*) in=./$1 ;;
6  *) in=$1 ;;
7esac
8case $2 in
9  -*) out=./$2 ;;
10  *) out=$2 ;;
11esac
12tmp=`echo "$out"|sed 's/\.zip$//'`
13
14rm -rf "$tmp"
15mkdir "$tmp"
16for r in 16 32 128 256 512 ; do
17  convert "$in" -resize "${r}x${r}" "$tmp/icon_${r}x${r}.png"
18done
19for r in 16 128 256 ; do
20  d=`expr $r + $r`
21  ln "$tmp/icon_${d}x${d}.png" "$tmp/icon_${r}x${r}@2x.png"
22done
23for r in 32 512 ; do
24  d=`expr $r + $r`
25  convert "$in" -resize "${d}x${d}" "$tmp/icon_${r}x${r}@2x.png" ; \
26done
27rm -f "$out"
28zip --move -r "$out" "$tmp"
Note: See TracBrowser for help on using the repository browser.