summaryrefslogtreecommitdiffstats
path: root/games/abuse/mkicons.sh
blob: 513cace80b57112690cdb3f57344d841f05b4289 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

src="$1"
shift
if [ -z "$src" -o ! -e "$src" -o "$*" ]; then
  cat 1>&2 <<EOF
Usage: $0 /path/to/icon.png
EOF
fi

set -e

mkdir -p icons/
cat "$src" > icons/160.png

for i in 16 22 32 48 64 128; do
  convert -resize ${i}x${i} "$src" icons/$i.png
done

exit 0