Use \.v0 as backup_suffix. Eliminate uniq.

Use -u1 -I'^#[.,:~]' as diff option for *.po files.
This commit is contained in:
Andrew V. Samoilov 2002-09-17 15:16:12 +00:00
parent f5f367c5ed
commit 4760ee4faa

View File

@ -3,10 +3,10 @@
# This script makes pretty looking patches provided that the old files # This script makes pretty looking patches provided that the old files
# are kept around with the .v0 suffix. # are kept around with the .v0 suffix.
: ${backup_suffix="v0"} : ${backup_suffix="\.v0"}
backup_files=`find . -path "*.$backup_suffix" -type f | sort | uniq` backup_files=`find . -path "*$backup_suffix" -type f | sort -u`
for oldfile in $backup_files; do for oldfile in $backup_files; do
newfile=`echo $oldfile | sed 's,^\./,,;s,\.'$backup_suffix'$,,'` newfile=`echo $oldfile | sed 's,^\./,,;s,'$backup_suffix'$,,'`
oldlabel="$oldprefix$newfile" oldlabel="$oldprefix$newfile"
newlabel="$newprefix$newfile" newlabel="$newprefix$newfile"
find "$oldfile" ! -size 0 | grep . >/dev/null || \ find "$oldfile" ! -size 0 | grep . >/dev/null || \
@ -15,6 +15,7 @@ for oldfile in $backup_files; do
{ newfile="/dev/null"; newlabel="/dev/null"; } { newfile="/dev/null"; newlabel="/dev/null"; }
case $newfile in case $newfile in
*.c) dflags="-u -p" ;; *.c) dflags="-u -p" ;;
*.po) dflags="-u1 -I'^#[:,.~]'"
*ChangeLog*) dflags="-u1" ;; *ChangeLog*) dflags="-u1" ;;
*) dflags="-u" ;; *) dflags="-u" ;;
esac esac