Emit diff headers (#237561)
authorPaul Nasrat <pnasrat@redhat.com>
Thu, 17 May 2007 10:06:55 +0000 (11:06 +0100)
committerPaul Nasrat <pnasrat@redhat.com>
Thu, 17 May 2007 10:06:55 +0000 (11:06 +0100)
Patch derived from Ville Skytta

scripts/gendiff

index 24068cc..342d3aa 100644 (file)
@@ -14,10 +14,11 @@ find $1 \( -name "*$2" -o -name ".*$2" \) -print |
 while read f; do
     U="${GENDIFF_DIFF_ARGS}"
     [ "`basename $f`" = "ChangeLog$2" ] && U="${GENDIFF_DIFF_CHANGELOG_ARGS}"
+    diffcmd="${DIFF} ${U} /dev/null ${f%$2}"
 #    ${DIFF} ${U} $f `echo $f | sed s/$2\$//`
     if [ -r "$f" ]; then
-       ${DIFF} ${U} "${f}" "${f%$2}"
-    else
-       ${DIFF} ${U} /dev/null "${f%$2}"
+        diffcmd="${DIFF} ${U} ${f} ${f%$2}"
     fi
+    echo "${diffcmd}"
+    ${diffcmd}
 done