Import patchsync version 2.1
authorMatt McCutchen <matt@mattmccutchen.net>
Wed, 2 Sep 2020 20:42:51 +0000 (16:42 -0400)
committerMatt McCutchen <matt@mattmccutchen.net>
Wed, 2 Sep 2020 20:42:51 +0000 (16:42 -0400)
Modification time: 2006-12-15 22:34:44 -0500

patchsync

index 07e2f0f..31a4001 100755 (executable)
--- a/patchsync
+++ b/patchsync
@@ -211,6 +211,10 @@ if [ -z "$whichtoupdate" ] && [[ -n $trunkch || -n $branchch || -n $patchch ]];
        #echo "Synchronization will update $whichtoupdate."
 fi
 
+# Remove old copy-out files to be clean and to make sure we don't
+# mistakenly copy them out this time.
+rm -rf patch-new branch-new
+
 if [ -n "$whichtoupdate" ]; then
 
 # Always show what would happen if patch-new and branch-new were copied out.
@@ -219,9 +223,6 @@ if [ -n "$whichtoupdate" ]; then
 # state if no error.
 error=
 
-# Don't let stuff from an old run confuse us.
-rm -rf patch-new branch-new
-
 function prepare_branch {
        echo "Preparing updated branch..."
        # No link-dest because we will modify and then link-dest when copying out