Created
December 5, 2012 11:47
-
-
Save matthewmayer/4214946 to your computer and use it in GitHub Desktop.
Loop through PNG files in a folder, creating non-retina versions from @2x retina versions if it does not already exist.
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/bash | |
for i in *@2x.png | |
do | |
if [ ! -f ${i/@2x.png/}.png ] | |
then | |
convert $i -resize 50% ${i/@2x.png/}.png | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment