Tools: Using HereDoc instead of echo(1).

This prevents accidents, which are likely to happen especially with quotes.

Signed-off-by: Alejandro Colomar <alx@nginx.com>
This commit is contained in:
Alejandro Colomar
2022-12-16 15:02:20 +01:00
parent aaba6fdcc9
commit 99a7fa7839

View File

@@ -9,11 +9,13 @@
if test -n ${BASH_VERSION} && test "${BASH_VERSINFO[0]}" -eq 3; then if test -n ${BASH_VERSION} && test "${BASH_VERSINFO[0]}" -eq 3; then
>&2 echo "Your version of bash(1) isn't supported by this script."; >&2 cat <<__EOF__ ;
>&2 echo "You're probably running on macOS. We recommend that you either"; Your version of bash(1) isn't supported by this script. You're probably
>&2 echo 'install a newer version of bash(1) or run this script with'; running on macOS. We recommend that you either install a newer version
>&2 echo 'another shell, such as zsh(1):'; of bash(1) or run this script with another shell, such as zsh(1):
>&2 echo " $ zsh ${SUDO_USER:+sudo }$0 ...";
$ zsh ${SUDO_USER:+sudo }$0 ...
__EOF__
exit 1; exit 1;
fi; fi;