Last active
August 29, 2015 14:11
-
-
Save Xummer/03d94cbe3598e512948a to your computer and use it in GitHub Desktop.
Get all size app icon for iOS8&Xcode6
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 | |
appicon="icon1024.png" | |
outputDir="AppIcon" | |
outputNamePrefix="AppIcon" | |
sizeArray=("29" "40" "50" "57" "58" "60" "72" "76" "80" "87" "100" "114" "120" "144" "152" "180") | |
if [ -d ${outputDir} ]; then | |
echo "${outputDir} is exit" | |
else | |
mkdir ${outputDir} | |
fi | |
for ((i=0;i<${#sizeArray[@]};++i)); do | |
path=${outputDir}/${outputNamePrefix}"${sizeArray[i]}x${sizeArray[i]}.png" | |
cp "${appicon}" "${path}" | |
sips -Z ${sizeArray[i]} "${path}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment