summaryrefslogtreecommitdiff
path: root/gendiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-07-13 19:54:36 +0000
committerjbj <devnull@localhost>2002-07-13 19:54:36 +0000
commit8caf68303188699c1a1d9499c53a43794a86d922 (patch)
tree70194bb4a49aa2344811f5a8e23a7c27b9cc7f41 /gendiff
parentfa1098b41069d66a3c7b6ba2bc07dba945ebc850 (diff)
downloadlibrpm-tizen-8caf68303188699c1a1d9499c53a43794a86d922.tar.gz
librpm-tizen-8caf68303188699c1a1d9499c53a43794a86d922.tar.bz2
librpm-tizen-8caf68303188699c1a1d9499c53a43794a86d922.zip
- teach gendiff about unreadable files (#42666).
CVS patchset: 5553 CVS date: 2002/07/13 19:54:36
Diffstat (limited to 'gendiff')
-rw-r--r--gendiff7
1 files changed, 6 insertions, 1 deletions
diff --git a/gendiff b/gendiff
index c00ce5156..de51c5710 100644
--- a/gendiff
+++ b/gendiff
@@ -10,5 +10,10 @@ 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}"
+ else
+ diff ${U} /dev/null "${f%$2}"
+ fi
done