Root/bin/purge

Source at commit 2db4c1a3a80a5d22de58ed81b9932afe7ea15626 created 12 years 8 months ago.
By Werner Almesberger, cad/test1/: experiment with Free scripted CAD systems (OpenSCAD and Cadmium)
1#!/bin/sh
2if [ "$1" ]; then
3    cd "$1" || exit
4fi
5git ls-files -m | grep '.pro$' |
6    while read n; do
7    if ! [ "`git diff "$n" |
8      sed '/^--- /d;/^+++ /d;/^[^-+]/d;/^.update=/d'`" ]; then
9        echo purging "$n" 1>&2
10        git checkout "$n"
11    fi
12    done
13

Archive Download this file

Branches:
master



interactive