Created
March 21, 2012 21:55
-
-
Save amarcadet/2153501 to your computer and use it in GitHub Desktop.
Shells scripts to compress/decompress optimized PNG files for iOS
This file contains hidden or 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
if [ ! -d "crushed" ]; then | |
mkdir crushed | |
fi | |
if [ -d "/Applications/Xcode.app/" ]; then | |
# Xcode 4.3 and later | |
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -dir crushed -iphone -q *.png | |
else | |
# Previous Xcode 4.3 | |
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -dir crushed -iphone -q *.png | |
fi |
This file contains hidden or 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
if [ ! -d "uncrushed" ]; then | |
mkdir uncrushed | |
fi | |
if [ -d "/Applications/Xcode.app/" ]; then | |
# Xcode 4.3 and later | |
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -dir uncrushed -revert-iphone-optimizations -q *.png | |
else | |
# Previous Xcode 4.3 | |
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -dir uncrushed -revert-iphone-optimizations -q *.png | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment