All pastes #480968 Raw Edit

Miscellany

public shellscript v1 · immutable
·published 2007-05-10 15:05 UTC
rendered paste body
diff -r ac4c8eb6ade1 scripts/gendiff--- a/scripts/gendiff   Thu May 10 13:15:34 2007 +0100+++ b/scripts/gendiff   Thu May 10 11:04:33 2007 -0400@@ -6,12 +6,17 @@   exit 1 } -: ${DIFF:=diff -p}+: ${GENDIFF_DIFF_STYLE:=-u}+: ${GENDIFF_DIFF_ARGS:=-p}+: ${DIFF:=diff}  find $1 \( -name "*$2" -o -name ".*$2" \) -print | while read f; do-    U=-u-    [ "`basename $f`" = "ChangeLog$2" ] && U=-U0+    U="${GENDIFF_DIFF_STYLE} ${GENDIFF_DIFF_ARGS}"+    if [ "`basename $f`" = "ChangeLog$2"+        -a "${GENDIFF_DIFF_STYLE}" = "-u" ]; then+      U="-U0 ${GENDIFF_DIFF_ARGS}"+    fi #    ${DIFF} ${U} $f `echo $f | sed s/$2\$//`     if [ -r "$f" ]; then        ${DIFF} ${U} "${f}" "${f%$2}"