Re: svn commit: r766112 - /ofbiz/branches/release09.04/mergefromtrunk.sh

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r766112 - /ofbiz/branches/release09.04/mergefromtrunk.sh

Adam Heath-2
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: svn commit: r766112 - /ofbiz/branches/release09.04/mergefromtrunk.sh

David E Jones-3

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:

> [hidden email] 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 | Threaded
Open this post in threaded view
|

Re: svn commit: r766112 - /ofbiz/branches/release09.04/mergefromtrunk.sh

Adam Heath-2
David E Jones wrote:
>
> 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... :)

http://shoop.cvs.sourceforge.net/viewvc/shoop/shoop/

Shoop: SHell Object Oriented Programming extends POSIX shell to have
OO support, adding classless object orientation (introspection,
finalization, serialization, multiple inheritance ) to plain old shell
script. (from Debian "oldstable")

Be afraid, very afraid.

ps: there's a feature that we make use of, that actually breaks the
POSIX claim, so the above is not actually valid. :(
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r766112 - /ofbiz/branches/release09.04/mergefromtrunk.sh

Jacques Le Roux
Administrator
From: "Adam Heath" <[hidden email]>

> David E Jones wrote:
>>
>> 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... :)
>
> http://shoop.cvs.sourceforge.net/viewvc/shoop/shoop/
>
> Shoop: SHell Object Oriented Programming extends POSIX shell to have
> OO support, adding classless object orientation (introspection,
> finalization, serialization, multiple inheritance ) to plain old shell
> script. (from Debian "oldstable")
>
> Be afraid, very afraid.

Frightening indeed!

Jacques
 
> ps: there's a feature that we make use of, that actually breaks the
> POSIX claim, so the above is not actually valid. :(
>