3 # This script makes pretty looking patches provided that the old files
4 # are kept around with the .v0 suffix.
6 : ${backup_suffix=${1:-"\.v0"}}
7 backup_files
=`find . -path "*$backup_suffix" -type f | sort -u`
8 for oldfile
in $backup_files; do
9 newfile
=`echo $oldfile | sed 's,^\./,,;s/'$backup_suffix'$//'`
10 oldlabel
="$oldprefix$newfile"
11 newlabel
="$newprefix$newfile"
12 find "$oldfile" ! -size 0 |
grep .
>/dev
/null || \
13 { oldfile
="/dev/null"; oldlabel
="/dev/null"; }
14 find "$newfile" ! -size 0 |
grep .
>/dev
/null || \
15 { newfile
="/dev/null"; newlabel
="/dev/null"; }
17 *.c
) dflags
="-u -p" ;;
18 *.po
) dflags
='-U 1 -I^#[:,.~]';;
21 diff $dflags -L "$oldlabel" -L "$newlabel" "$oldfile" "$newfile"