r20654 - gnucash/trunk/util - Force /bin/echo in git section

John Ralls jralls at code.gnucash.org
Tue May 17 14:24:10 EDT 2011


Author: jralls
Date: 2011-05-17 14:24:10 -0400 (Tue, 17 May 2011)
New Revision: 20654
Trac: http://svn.gnucash.org/trac/changeset/20654

Modified:
   gnucash/trunk/util/gnc-svnversion
Log:
Force /bin/echo in git section

Apple's version of bash version 3, when called as /bin/sh, uses an internal echo command which doesn't handle the "-n" argument and contaminates the git version string. /bin/echo correctly handles the -n argument.

Modified: gnucash/trunk/util/gnc-svnversion
===================================================================
--- gnucash/trunk/util/gnc-svnversion	2011-05-17 09:03:17 UTC (rev 20653)
+++ gnucash/trunk/util/gnc-svnversion	2011-05-17 18:24:10 UTC (rev 20654)
@@ -69,12 +69,12 @@
 then
   githead=`git --git-dir "${real_gitdir}" log -1 --pretty=format:"%h" HEAD 2>/dev/null`  # short hash only
   if test $? = 0 ; then
-    echo -n $githead
+    /bin/echo -n $githead
     # Add a "+" to the hash if there deleted or modified files (not excluded by .gitignore and friends)
     # "Ignores" untracked files
-    # [ $(git --git-dir "${real_gitdir}" ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
+    # [ $(git --git-dir "${real_gitdir}" ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && /bin/echo -n "+"
     # Includes untracked files
-    [ $(git --git-dir "${real_gitdir}" ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && echo -n "+"
+    [ $(git --git-dir "${real_gitdir}" ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && /bin/echo -n "+"
     echo
     exit 0
   else



More information about the gnucash-changes mailing list