Hi. The following script:<div><br></div><div><div># run this script from build/ subdirectory, so vmVersionInfo.h will be placed in build dir</div><div><br></div><div>URL=`git config --get remote.origin.url`</div><div>COMMIT=`git show HEAD --pretty="Commit: %H Date: %ci By: %cn <%cE>" | head -n 1`</div>
<div><br></div><div>echo -n "#define REVISION_STRING \"$URL $COMMIT " > vmVersionInfo.h </div><div>test -n "${BUILD_NUMBER}" && echo -n "Jenkins build #${BUILD_NUMBER}" >> vmVersionInfo.h || echo</div>
<div>echo "\"" >> vmVersionInfo.h</div><div><br></div><div><br></div><div>fails in 10.6.8 because the result is:</div><div><br></div><div>
<p class="p1"><span class="s1">-n #define REVISION_STRING </span>"git://<a href="http://gitorious.org/cogvm/blessed.git">gitorious.org/cogvm/blessed.git</a> Commit: e0c448cf8de6377605d8831ae20f72565c1922ca Date: 2012-11-14 15:34:11 +0100 By: Esteban Lorenzano <<a href="mailto:estebanlm@gmail.com">estebanlm@gmail.com</a>> </p>
<p class="p1">"</p></div><div>(notice the -n at the beginning)</div><div><br></div><div>This -n is the one that is in the first echo: echo -n "#define REVISION_STRING \"$URL $COMMIT " > vmVersionInfo.h </div>
<div><br></div><div>What is weird is that script works in Lion....</div><div><br></div><div>So, any workaround that could work in all OS? </div><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br>
<br>
</div>