Created
November 5, 2014 22:18
-
-
Save leibovic/dd8e729a81739b94ff74 to your computer and use it in GitHub Desktop.
pngcrush all changed files in the topmost hg commit
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 | |
# pngcrushes any changed files in the top-most patch | |
files=`hg status -n --rev .^` | |
for f in $files | |
do | |
echo $f | |
pngcrush $f $f.new | |
mv $f.new $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment