daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Oct 27th, 2015 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. if [[ -z "$@" ]]; then
  4.     echo "Input file missing"
  5. else
  6.     filename=${1%.*}
  7.     mkdir $filename.iconset
  8.     sips -z 16 16   $1 --out $filename.iconset/icon_16x16.png
  9.     sips -z 32 32   $1 --out $filename.iconset/icon_16x16@2x.png
  10.     sips -z 32 32   $1 --out $filename.iconset/icon_32x32.png
  11.     sips -z 64 64   $1 --out $filename.iconset/icon_32x32@2x.png
  12.     sips -z 128 128 $1 --out $filename.iconset/icon_128x128.png
  13.     sips -z 256 256 $1 --out $filename.iconset/icon_128x128@2x.png
  14.     sips -z 256 256 $1 --out $filename.iconset/icon_256x256.png
  15.     sips -z 512 512 $1 --out $filename.iconset/icon_256x256@2x.png
  16.     sips -z 512 512 $1 --out $filename.iconset/icon_512x512.png
  17.     cp $1 $filename.iconset/icon_512x512@2x.png
  18.     iconutil -c icns $filename.iconset
  19.     rm -r $filename.iconset
  20. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top