From 9a3f873f7d146418dad45fa97a5b484c297816ca Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 18 Dec 2010 05:34:32 -0300 Subject: [PATCH] bin/purge: revert KiCad .pro files in which only the timestamp changed --- bin/purge | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 bin/purge 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