File: makemacicon.sh

package info (click to toggle)
diffuse 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,160 kB
  • sloc: python: 7,689; xml: 5,993; sh: 61; makefile: 9
file content (20 lines) | stat: -rwxr-xr-x 526 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

# Use this tool if you need to re-create
# Diffuse.app/Contents/Resources/diffuse.icns
# in case the icon changes (unlikely).

sizes=(16 32 64 128 256 512)
for s in "${sizes[@]}"; do
  echo $s
  rsvg-convert -h $s "$1" > "icon_${s}x$s.png"
done

cp 'icon_32x32.png'     'icon_16x16@2x.png'
cp 'icon_64x64.png'     'icon_32x32@2x.png'
cp 'icon_256x256.png'   'icon_128x128@2x.png'
cp 'icon_512x512.png'   'icon_256x256@2x.png'

mkdir icon.iconset
mv icon_*x*.png icon.iconset
iconutil -c icns icon.iconset