]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
configure: use simpler/more portable echo_n
authorMike Frysinger <vapier@gentoo.org>
Mon, 20 Jun 2016 04:21:38 +0000 (00:21 -0400)
committerMartin Mares <mj@ucw.cz>
Fri, 17 Nov 2017 12:55:33 +0000 (13:55 +0100)
The `echo -n` behavior is not in POSIX and not all shells support it.
Use the portable `printf` func as defined by POSIX.

lib/configure

index 7d4cec85fd2ca8d8838ed2d1ba5f7c5a0a93c1af..363f5b486c07e45fc6d0f0e16e3e71ecaa038dd4 100755 (executable)
@@ -6,12 +6,7 @@ LC_ALL=C
 export LC_ALL
 
 echo_n() {
-       if [ -n "$BASH" ]
-       then
-               echo -n "$*"
-       else
-               echo "$*\c"
-       fi
+       printf '%s' "$*"
 }
 
 if [ -z "$VERSION" -o -z "$IDSDIR" ] ; then