diff options
author | Paul Nasrat <pnasrat@redhat.com> | 2007-04-16 12:42:56 +0100 |
---|---|---|
committer | Paul Nasrat <pnasrat@redhat.com> | 2007-04-16 12:42:56 +0100 |
commit | 1bb1b1e24dcb17cd9e1952b2f5bb41195ab904cf (patch) | |
tree | 1d7e96421699723c0939d4976a9d50dbb20601d8 /scripts/gendiff | |
parent | a7d07fd6df1e3a57de899af6bc6cc718ae38c064 (diff) | |
download | librpm-tizen-1bb1b1e24dcb17cd9e1952b2f5bb41195ab904cf.tar.gz librpm-tizen-1bb1b1e24dcb17cd9e1952b2f5bb41195ab904cf.tar.bz2 librpm-tizen-1bb1b1e24dcb17cd9e1952b2f5bb41195ab904cf.zip |
Allow customisable diff and use -p by default (#146981)
Diffstat (limited to 'scripts/gendiff')
-rw-r--r-- | scripts/gendiff | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/gendiff b/scripts/gendiff index de51c5710..1abdcd077 100644 --- a/scripts/gendiff +++ b/scripts/gendiff @@ -6,14 +6,16 @@ exit 1 } +: ${DIFF:=diff -p} + find $1 \( -name "*$2" -o -name ".*$2" \) -print | while read f; do U=-u [ "`basename $f`" = "ChangeLog$2" ] && U=-U0 -# diff ${U} $f `echo $f | sed s/$2\$//` +# ${DIFF} ${U} $f `echo $f | sed s/$2\$//` if [ -r "$f" ]; then - diff ${U} "${f}" "${f%$2}" + ${DIFF} ${U} "${f}" "${f%$2}" else - diff ${U} /dev/null "${f%$2}" + ${DIFF} ${U} /dev/null "${f%$2}" fi done |