]> Savannah Git Hosting - gnulib.git/commitdiff
git-version-gen: do not print new line characters
authorKO Myung-Hun <komh78@gmail.com>
Tue, 2 Dec 2014 05:55:20 +0000 (14:55 +0900)
committerEric Blake <eblake@redhat.com>
Tue, 2 Dec 2014 19:38:14 +0000 (12:38 -0700)
On platforms with CRLF endings (such as OS/2), use of 'echo' may
leave behind an unwanted CR.

* build-aux/git-version-gen: Use printf instead of echo and tr.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
build-aux/git-version-gen

index 2398d79d235e410635620009f3cc9f4c143d246f..7379fa6d780543e06e5a1ee3228c90e2668fb521 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-12-02  KO Myung-Hun  <komh78@gmail.com>
 
+       git-version-gen: do not print new line characters
+       * build-aux/git-version-gen: Use printf instead of echo and tr.
+
        gnulib-tool: recognize x:* as an absolute path
        * gnulib-tool (func_gnulib_dir): Add ?:* case.
        (func_relconcat): Likewise.
index 47d657674d2c097ff21eba2667cf32dd3882459c..48769baa1fd4d0bcc921bdd4f05918d60bdf34df 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2014-06-19.19; # UTC
+scriptversion=2014-12-02.19; # UTC
 
 # Copyright (C) 2007-2014 Free Software Foundation, Inc.
 #
@@ -215,7 +215,7 @@ if test "x$v_from_git" != x; then
 fi
 
 # Omit the trailing newline, so that m4_esyscmd can use the result directly.
-echo "$v" | tr -d "$nl"
+printf %s "$v"
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)