Last active
December 24, 2015 22:59
-
-
Save acrookston/6877276 to your computer and use it in GitHub Desktop.
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 | |
# Depends on pngbai script: https://gist.github.com/acrookston/6877287 | |
# And don't forget to install pngbai's dependencies (documeted there) | |
FILES=`git diff --name-only origin/master | grep '\.png$'` | |
for file in $FILES; do | |
echo "$file" | |
git add $file | |
pngbai $file "${file}2" | |
done | |
find . -iname *.png2 -exec bash -c 'mv {} `dirname {}`/`basename {} .png2`.png' \; | |
find . -iname *.png2.png -exec bash -c 'rm {}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment