diff --git a/bin/purge b/bin/purge new file mode 100755 index 0000000..2fc4033 --- /dev/null +++ b/bin/purge @@ -0,0 +1,12 @@ +#!/bin/sh +if [ "$1" ]; then + cd "$1" || exit +fi +git ls-files -m | grep '.pro$' | + while read n; do + if ! [ "`git diff "$n" | + sed '/^--- /d;/^+++ /d;/^[^-+]/d;/^.update=/d'`" ]; then + echo purging "$n" 1>&2 + git checkout "$n" + fi + done