[Vm-dev] echo -n in extract-commit-info.sh

Mariano Martinez Peck marianopeck at gmail.com
Sat Nov 17 13:31:48 UTC 2012


On Sat, Nov 17, 2012 at 2:29 PM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

>
>
> On Sat, Nov 17, 2012 at 1:49 PM, Igor Stasenko <siguctua at gmail.com> wrote:
>
>>
>> On 17 November 2012 09:00, Mariano Martinez Peck <marianopeck at gmail.com>
>> wrote:
>> >
>> > zsh but Luc is not (I think) and he got the same problem.
>> > Do you think this can be the problem?
>> >
>> sure. because echo is builtin shell command
>>
>>
> With  the following I get the same results:
>
> sh ../codegen-scripts/extract-commit-info.sh
>
>
>
Adding #!/bin/bash
at the beginning of the file woks of course.
Can I commit that?


>
> > On Sat, Nov 17, 2012 at 12:58 PM, Igor Stasenko <siguctua at gmail.com>
>> wrote:
>> >>
>> >>
>> >> On 17 November 2012 07:24, Mariano Martinez Peck <
>> marianopeck at gmail.com> wrote:
>> >> >
>> >> > Hi. The following script:
>> >> >
>> >> > # run this script from build/ subdirectory, so vmVersionInfo.h will
>> be placed in build dir
>> >> >
>> >> > URL=`git config --get remote.origin.url`
>> >> > COMMIT=`git show HEAD --pretty="Commit: %H Date: %ci By: %cn <%cE>"
>> | head -n 1`
>> >> >
>> >> > echo -n "#define REVISION_STRING \"$URL $COMMIT " > vmVersionInfo.h
>> >> > test -n "${BUILD_NUMBER}" && echo -n "Jenkins build
>> #${BUILD_NUMBER}" >> vmVersionInfo.h || echo
>> >> > echo "\"" >> vmVersionInfo.h
>> >> >
>> >> >
>> >> > fails in 10.6.8  because the result is:
>> >> >
>> >> > -n #define REVISION_STRING "git://gitorious.org/cogvm/blessed.gitCommit: e0c448cf8de6377605d8831ae20f72565c1922ca Date: 2012-11-14 15:34:11
>> +0100 By: Esteban Lorenzano <estebanlm at gmail.com>
>> >> >
>> >> > "
>> >> >
>> >> > (notice the -n at the beginning)
>> >> >
>> >> > This -n is the one that is in the first echo: echo -n "#define
>> REVISION_STRING \"$URL $COMMIT " > vmVersionInfo.h
>> >> >
>> >> > What is weird is that script works in Lion....
>> >> >
>> >> > So, any workaround that could work in all OS?
>> >> >
>> >> what shell you using?
>> >>
>> >> > --
>> >> > Mariano
>> >> > http://marianopeck.wordpress.com
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Best regards,
>> >> Igor Stasenko.
>> >
>> >
>> >
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20121117/ad303f07/attachment.htm


More information about the Vm-dev mailing list