Please do Adam! I'm no shell scripter myself, and just hacked this together in a few minutes a couple of years ago when I got tired of doing these frequent bug fix merges manually.

If you look at the one (done by Jacques?) for Windows it's actually much more feature rich... :)

-David


On Apr 17, 2009, at 1:46 PM, Adam Heath wrote:

[email protected] wrote:
Author: jonesde
Date: Fri Apr 17 18:26:37 2009
New Revision: 766112

URL: http://svn.apache.org/viewvc?rev=766112&view=rev
Log:
Added the Linux/Unix version of the mergefromtrunk script

Added:
   ofbiz/branches/release09.04/mergefromtrunk.sh   (with props)

Added: ofbiz/branches/release09.04/mergefromtrunk.sh
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release09.04/mergefromtrunk.sh?rev=766112&view=auto
= = = = = = = = = =====================================================================
--- ofbiz/branches/release09.04/mergefromtrunk.sh (added)
+++ ofbiz/branches/release09.04/mergefromtrunk.sh Fri Apr 17 18:26:37 2009
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+prevRev=`expr $1 - 1`
+svn merge -r $prevRev:$1 https://svn.apache.org/repos/asf/ofbiz/ trunk
+svn commit -m "Applied fix from trunk for revision: $1"
+

Bother.  prevRev=$(($1 - 1)).

$(()) is posix.

Additionally, what happens if someone doesn't specify $1 when the
script is called?  There's no set -e, no safe shell programming
techniques.

I'll fix this myself; shell programming issues are a pet peeve of mine.

Also, where is the license header?

Reply via email to