[Vm-dev] echo -n in extract-commit-info.sh
Mariano Martinez Peck
marianopeck at gmail.com
Sat Nov 17 10:24:16 UTC 2012
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.git Commit:
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?
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20121117/6dfb7530/attachment.htm
More information about the Vm-dev
mailing list