* [Buildroot] [PATCH] support/dependencies/dependencies.sh: simplify an error message
@ 2019-04-09 22:05 Markus Mayer
2019-04-10 5:46 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Markus Mayer @ 2019-04-09 22:05 UTC (permalink / raw)
To: buildroot
There is no need to break the "\n" sequence using "%sn". We can just
escape it. Note: the escaping backslash needs to be escaped too,
because the shell will process the string before printf gets to see it.
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
support/dependencies/dependencies.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
index 826874baa2e8..1d5c164aa65b 100755
--- a/support/dependencies/dependencies.sh
+++ b/support/dependencies/dependencies.sh
@@ -37,8 +37,7 @@ case ":${PATH:-unset}:" in
;;
(*"
"*) printf "\n"
- # Break the '\n' sequence, or a \n is printed (which is not what we want).
- printf "Your PATH contains a newline (%sn) character.\n" "\\"
+ printf "Your PATH contains a newline (\\\n) character.\n"
printf "This doesn't work. Fix you PATH.\n"
exit 1
;;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] support/dependencies/dependencies.sh: simplify an error message
2019-04-09 22:05 [Buildroot] [PATCH] support/dependencies/dependencies.sh: simplify an error message Markus Mayer
@ 2019-04-10 5:46 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2019-04-10 5:46 UTC (permalink / raw)
To: buildroot
>>>>> "Markus" == Markus Mayer <mmayer@broadcom.com> writes:
> There is no need to break the "\n" sequence using "%sn". We can just
> escape it. Note: the escaping backslash needs to be escaped too,
> because the shell will process the string before printf gets to see it.
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Maybe we should have used single quotes here to get rid of one layer of
quoting.
Committed, thanks.
> ---
> support/dependencies/dependencies.sh | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh
> index 826874baa2e8..1d5c164aa65b 100755
> --- a/support/dependencies/dependencies.sh
> +++ b/support/dependencies/dependencies.sh
> @@ -37,8 +37,7 @@ case ":${PATH:-unset}:" in
> ;;
> (*"
> "*) printf "\n"
> - # Break the '\n' sequence, or a \n is printed (which is not what we want).
> - printf "Your PATH contains a newline (%sn) character.\n" "\\"
> + printf "Your PATH contains a newline (\\\n) character.\n"
> printf "This doesn't work. Fix you PATH.\n"
> exit 1
> ;;
> --
> 2.17.1
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-10 5:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 22:05 [Buildroot] [PATCH] support/dependencies/dependencies.sh: simplify an error message Markus Mayer
2019-04-10 5:46 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.