Fix silently failing branch merge script on Mac
authordanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Sep 2012 11:19:35 +0000 (11:19 +0000)
committerdanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Sep 2012 11:19:35 +0000 (11:19 +0000)
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10981034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

tools/merge-to-branch.sh

index aa590a3..d26fbcc 100755 (executable)
@@ -205,8 +205,9 @@ if [ $START_STEP -le $CURRENT_STEP ] ; then
 your EDITOR on $VERSION_FILE so you can make arbitrary changes. When \
 you're done, save the file and exit your EDITOR.)"
   if [ $? -eq 0 ] ; then
+    echo $NEWPATCH $VERSION_FILE
     sed -e "/#define PATCH_LEVEL/s/[0-9]*$/$NEWPATCH/" \
-        -i "$VERSION_FILE"
+        -i.bak "$VERSION_FILE" || die "Could not increment patch level"
   else
     $EDITOR "$VERSION_FILE"
   fi