mkversion: be more portable, use 'print "%s"' instead of 'echo -n'
authorMichael Adam <obnox@samba.org>
Tue, 1 Apr 2008 13:54:34 +0000 (15:54 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 1 Apr 2008 14:16:55 +0000 (16:16 +0200)
Michael
(This used to be commit 7a23dab1eaf3116079a89cdf348cabc659608031)

source3/script/mkversion.sh

index 877138f9777679ca65e33420270a88681f900484..b67847697698fe8cc156620e1ddb45a9ae4c9e31 100755 (executable)
@@ -73,10 +73,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