On Sat, Nov 17, 2012 at 1:49 PM, Igor Stasenko siguctua@gmail.com wrote:
On 17 November 2012 09:00, Mariano Martinez Peck marianopeck@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
On Sat, Nov 17, 2012 at 12:58 PM, Igor Stasenko siguctua@gmail.com wrote:
On 17 November 2012 07:24, Mariano Martinez Peck marianopeck@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@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.