From 1bbe5cf9efc6aabe3ed79485b973f44544bda0ac Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 1 Apr 2018 15:19:48 +0000 Subject: [PATCH] Added a guard to bin/mkpatch to avoid overwriting existing patches. - Legacy-Id: 14983 --- bin/mkpatch | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/mkpatch b/bin/mkpatch index facf3059d..ea1d95292 100755 --- a/bin/mkpatch +++ b/bin/mkpatch @@ -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 ""