Created
April 9, 2013 11:56
-
-
Save mattak/5345120 to your computer and use it in GitHub Desktop.
rename drawable-{xx}dpi/${from}.png -> drawable-{xx}dpi/${to}.png
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 | |
# | |
# dpifile | |
# | |
# usage: dpifile help ic_help | |
# | |
if [ $# -lt 2 ]; then | |
echo "usage: [fromfile] [to_file]" | |
exit 0 | |
fi | |
FROM_FILE=$1 | |
TO_FILE=$2 | |
for d in `find . -type d -depth 1 | grep drawable-` | |
do | |
cd $d | |
if [ -f $FROM_FILE.png ]; then | |
echo mv $FROM_FILE.png $TO_FILE.png | |
mv $FROM_FILE.png $TO_FILE.png | |
fi | |
cd - > /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment