[vlc-devel] [PATCH 2/7 v2] contrib/bootstrap: Use helper for echo -n

Rémi Denis-Courmont remi at remlab.net
Wed Jun 5 16:58:34 CEST 2019


Much simpler to just call printf directly...

Le 5 juin 2019 17:15:48 GMT+03:00, Marvin Scholz <epirat07 at gmail.com> a écrit :
>echo -n is not portable and does not print as expected on macOS and
>possibly other BSDs. Use a helper that internally uses printf instead.
>---
> contrib/bootstrap | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/contrib/bootstrap b/contrib/bootstrap
>index 76b200ab16..f1c6a75be6 100755
>--- a/contrib/bootstrap
>+++ b/contrib/bootstrap
>@@ -38,6 +38,9 @@ usage()
> 	echo "  --enable-pdb     generate debug information in PDB format"
> }
> 
>+# Print without newline
>+echo_n() { printf "%s" "$*"; }
>+
> BUILD=
> HOST=
> PREFIX=
>@@ -124,7 +127,7 @@ fi
> 
> if test -z "$BUILD"
> then
>-	echo -n "Guessing build system... "
>+	echo_n "Guessing build system... "
> 	BUILD="`${CC:-cc} -dumpmachine | sed s/windows-gnu/mingw32/`"
> 	if test -z "$BUILD"; then
> 		echo "FAIL!"
>@@ -135,12 +138,12 @@ fi
> 
> if test -z "$HOST"
> then
>-	echo -n "Guessing host system...  "
>+	echo_n "Guessing host system...  "
> 	HOST="$BUILD"
> 	echo "$HOST"
> fi
> 
>-echo -n "Packages licensing...    "
>+echo_n "Packages licensing...    "
> if test -n "$GPL"
> then
> 	if test -n "$GNUV3"
>-- 
>2.20.1 (Apple Git-117)
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190605/61e2ca15/attachment.html>


More information about the vlc-devel mailing list