MKSHELL=rc path=$PLAN9/bin $path eps = wmii.eps calc = rc -c 'hoc -e $"*' epsbox = `{sed -n '/^%%BoundingBox:/{s/.*://p; q;}' $eps} iconwidth = 154 iconscale = `{*=$epsbox; $calc $iconwidth / '('$3 - $1')'} iconheight = `{*=$epsbox; $calc '('$4 - $2') *' $iconscale} %.png: %.eps * = `{hoc -e'-('$epsbox')'} x = $1 y = $2 gs -q -dBATCH -dNOPAUSE -s'DEVICE=pngalpha' -s'OutputFile='$target -g$iconwidth'x'$iconheight - <