Created
October 28, 2015 02:04
-
-
Save koshian/f67acd854cbe8b9ce72b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SRC=$1 | |
EXT=`basename $SRC | sed -e 's/^.*\.\(.*\)$/\1/'` | |
SIZES='iTunesArtwork_512x512 iTunesArtwork@2x_1024x1014 Icon-60@2x_120x120 Icon-60@3x_180x180 Icon-57_57x57 Icon-57@2x_114x114 Icon-29_29x29 Icon-29@2x_58x58 Icon-29@3x_87x87 Icon-40@2x_80x80 Icon-40@3x_120x120 Icon-76_76x76 Icon-76@2x_152x152 Icon-72_72x72 Icon-72@2x_144x144 Icon-50_50x50 Icon-50@2x_100x100' | |
for s in $SIZES; do | |
OPT=`echo $s | sed -e 's/^\(.*\)_\(.*\)$/\2 \1/'` | |
convert $SRC -resize ${OPT}.${EXT} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment