Skip to content

Instantly share code, notes, and snippets.

@acrookston acrookston/pngbai_git
Last active Dec 24, 2015

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.