Skip to content

Instantly share code, notes, and snippets.

@seabre
Created October 17, 2011 16:44
Show Gist options
  • Save seabre/1293045 to your computer and use it in GitHub Desktop.
Save seabre/1293045 to your computer and use it in GitHub Desktop.
Crush All PNGs Starting From Root Directory.
#!/bin/bash
(find . -name "*.png")|while read pngfile
do
PNG_FILE=$pngfile
PNG_TMP=$RANDOM.compressallpng.png
pngcrush -brute $PNG_FILE $PNG_TMP
mv $PNG_TMP $PNG_FILE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment