r20703 - gnucash/branches/2.4/util - [20654]Force /bin/echo in git section

John Ralls jralls at code.gnucash.org
Fri May 27 11:26:26 EDT 2011


Author: jralls
Date: 2011-05-27 11:26:26 -0400 (Fri, 27 May 2011)
New Revision: 20703
Trac: http://svn.gnucash.org/trac/changeset/20703

Modified:
   gnucash/branches/2.4/util/gnc-svnversion
Log:
[20654]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/branches/2.4/util/gnc-svnversion
===================================================================
--- gnucash/branches/2.4/util/gnc-svnversion	2011-05-27 15:26:18 UTC (rev 20702)
+++ gnucash/branches/2.4/util/gnc-svnversion	2011-05-27 15:26:26 UTC (rev 20703)
@@ -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