Permalink
Browse files

[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.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/2.4@20703 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information...
1 parent 302bf62 commit 32a662b9e53791ed8e420bf4b717c848b52c008e @jralls jralls committed May 27, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 util/gnc-svnversion
View
@@ -69,12 +69,12 @@ if test -d "${real_gitdir}"
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

0 comments on commit 32a662b

Please sign in to comment.