Last active
August 29, 2015 13:56
-
-
Save dkasper/9219200 to your computer and use it in GitHub Desktop.
Utility scripts for dealing with assets on 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
#!/bin/bash | |
# This script assumes that ImageMagick is installed and the convert command is accessible\ | |
# Create copies of all files in directory at 50% size (and names them without @2x) | |
for infile in * | |
do | |
outfile=$(echo $infile | sed -n "s/@2x//p") | |
test -z $outfile && continue | |
convert $infile -resize 50% $outfile | |
done |
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
#!/bin/bash | |
#Rename all .png assets in a directory to @2x.png (since non-developers often don't know to name them that way) | |
rename 's/\.png/\@2x.png/' * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment