Added a guard to bin/mkpatch to avoid overwriting existing patches.

- Legacy-Id: 14983
This commit is contained in:
Henrik Levkowetz 2018-04-01 15:19:48 +00:00
parent ff196edc0c
commit 1bbe5cf9ef

View file

@ -111,6 +111,7 @@ if [[ $1 =~ / ]]; then die "Expected a patch name, but the first argument to $pr
name=$1; shift;
patchfile=$progdir/../../patches/$(date +%Y-%m-%d)-$name.patch
if [ -e $patchfile ]; then die "Patchfile $patchfile already exists"; fi
svn diff ${CHG:+ -c $CHG} ${REV:+ -r $REV} "$@" > $patchfile
less $patchfile
echo ""