Use first parameter as backup_suffix if backup_suffix is unset or empty

This commit is contained in:
Andrew V. Samoilov 2002-11-19 18:56:52 +00:00
parent a5c1f136d5
commit 307e634147

View File

@ -3,7 +3,7 @@
# This script makes pretty looking patches provided that the old files
# are kept around with the .v0 suffix.
: ${backup_suffix="\.v0"}
: ${backup_suffix=${1:-"\.v0"}}
backup_files=`find . -path "*$backup_suffix" -type f | sort -u`
for oldfile in $backup_files; do
newfile=`echo $oldfile | sed 's,^\./,,;s/'$backup_suffix'$//'`