diff --git a/generate-icns.sh b/generate-icns.sh index 5f5d262..32f712e 100755 --- a/generate-icns.sh +++ b/generate-icns.sh @@ -21,7 +21,7 @@ for SIZE in $((DIMS[0] - WIDESORT[0])) $((DIMS[0] + WIDESORT[0])); do (( SIZE > 0 && (SIZE & (SIZE - 1)) == 0 )) && RESIZE=${SIZE} done -set -x -convert "${1}" -resize ${RESIZE}x${RESIZE} /tmp/tmp.png -png2icns ${1/%png/icns} /tmp/tmp.png -rm /tmp/tmp.png +TEMPFILE=$(mktemp) +convert "${1}" -resize ${RESIZE}x${RESIZE}\! ${TEMPFILE} +png2icns ${1/%png/icns} ${TEMPFILE} +rm ${TEMPFILE}