Created
August 15, 2011 22:07
-
-
Save johnantoni/1147991 to your computer and use it in GitHub Desktop.
pngcrush directory script
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/sh | |
| for png in `find $1 -name "*.png"`; | |
| do | |
| echo "crushing $png" | |
| pngcrush -brute "$png" temp.png | |
| mv -f temp.png $png | |
| done; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
install pngcrush with brew http://mxcl.github.com/homebrew/ via....
brew install pngcrush
then with this bash script compress an entire directory via....
./crush.sh media/img