Created
February 26, 2013 12:22
-
-
Save gingertom/5038071 to your computer and use it in GitHub Desktop.
Simple image magic script to go through a folder of @2x images and make non-retina copies of them too. Usage (run in folder to affect): path/to/resizer/resizer.sh
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 -e | |
cd "${1-.}" | |
for f in *; do | |
if [[ $f == *@2x* ]]; | |
then | |
convert $f -resize 50% ${f//@2x/} | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very useful. Thanks!