mkversion.sh: printf %s is more portable than echo -e
authorStefan Metzmacher <metze@samba.org>
Wed, 25 Jun 2008 17:14:34 +0000 (19:14 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 27 Jun 2008 07:22:21 +0000 (09:22 +0200)
metze

source/script/mkversion.sh

index b6d82f8797497fa7a55610c59cef1654d3ff2552..da912ac0927cae20e8a8a7c7a8768ba760e43230 100755 (executable)
@@ -77,10 +77,10 @@ if test x"${SAMBA_VERSION_IS_GIT_SNAPSHOT}" = x"yes";then
     if test x"${HAVEVER}" != x"yes" -a -d "${SOURCE_DIR}../.git";then
        HAVEGIT=no
        GIT_INFO=`git show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD 2>/dev/null`
-       GIT_COMMIT_ABBREV=`echo -e "${GIT_INFO}" | sed -n 1p`
-       GIT_COMMIT_TIME=`echo -e "${GIT_INFO}" | sed -n 2p`
-       GIT_COMMIT_FULLREV=`echo -e "${GIT_INFO}" | sed -n 3p`
-       GIT_COMMIT_DATE=`echo -e "${GIT_INFO}" | sed -n 4p`
+       GIT_COMMIT_ABBREV=`printf %s "${GIT_INFO}" | sed -n 1p`
+       GIT_COMMIT_TIME=`printf %s "${GIT_INFO}" | sed -n 2p`
+       GIT_COMMIT_FULLREV=`printf %s "${GIT_INFO}" | sed -n 3p`
+       GIT_COMMIT_DATE=`printf %s "${GIT_INFO}" | sed -n 4p`
        if test -n "${GIT_COMMIT_ABBREV}";then
            HAVEGIT=yes
             HAVEVER=yes