RFR: 8048184 : (s) handle mercurial dev build version string
pointo1d
pointo1d at gmail.com
Tue Jul 8 13:52:44 UTC 2014
Hiya Daniel ,
On 08/07/14 14:44, Daniel Fuchs wrote:
> Hi,
>
> Thanks Dave,
>
> yes - your patch works like a charm :-)
>
> best regards,
>
> -- daniel
>
> Note: the following also works on my machine:
>
> ----------------------------------------------
>
> check() {
> read var
> if expr 1 + $var >/dev/null ; then
> echo $var
> else
> return 2
> fi
> }
>
> hgmajor="`echo $hgversion | cut -f 1 -d . | check 2> /dev/null || echo
> -1`"
> hgminor="`echo $hgversion | cut -f 2 -d . | check 2> /dev/null || echo
> -1`"
> hgrev="`echo $hgversion.0 | cut -f 3 -d . | check 2> /dev/null || echo
> -1`" # rev is omitted for minor and major releases
>
> ----------------------------------------------
>
>
> On 7/8/14 3:27 PM, pointo1d wrote:
>> <snip>
>
NaP.
I took the opporchancity to apply TIMTOWTDI and rework the script such
that the splitting of the version string becomes less prone to potential
copy and paste errors and also to simplify the field validation.
Rgds ,
--
Dave Pointon FIAP MBCS - Contractor engaged by IBM
Now I saw, tho' too late, the folly of beginning a work before we count the cost and before we we judge rightly of our strength to go thro' with it - Robinson Crusoe
More information about the build-dev
mailing list