Skip to content

Instantly share code, notes, and snippets.

@acrookston acrookston/pngbai_git
Last active Dec 24, 2015

What would you like to do?
# Depends on pngbai script:
# 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"
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
You can’t perform that action at this time.