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=&quot;Commit: %H Date: %ci By: %cn &lt;%cE&gt;&quot; | head -n 1`</div>
<div><br></div><div>echo -n &quot;#define REVISION_STRING \&quot;$URL $COMMIT &quot; &gt; vmVersionInfo.h </div><div>test -n &quot;${BUILD_NUMBER}&quot; &amp;&amp; echo -n &quot;Jenkins build #${BUILD_NUMBER}&quot; &gt;&gt; vmVersionInfo.h || echo</div>
<div>echo &quot;\&quot;&quot; &gt;&gt; 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>&quot;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 &lt;<a href="mailto:estebanlm@gmail.com">estebanlm@gmail.com</a>&gt; </p>

<p class="p1">&quot;</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 &quot;#define REVISION_STRING \&quot;$URL $COMMIT &quot; &gt; 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>