diff options
author | Alejandro Colomar <alx@nginx.com> | 2022-12-16 15:02:20 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@nginx.com> | 2022-12-16 20:42:39 +0100 |
commit | 99a7fa783917fac7fa38aa619d8e02b61dd1d816 (patch) | |
tree | 730e675412b6bf2be11f17b6e682035995b41a20 | |
parent | aaba6fdcc923fd4816eb450a4863740b743e86e2 (diff) | |
download | unit-99a7fa783917fac7fa38aa619d8e02b61dd1d816.tar.gz unit-99a7fa783917fac7fa38aa619d8e02b61dd1d816.tar.bz2 |
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>
-rwxr-xr-x | tools/setup-unit | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/setup-unit b/tools/setup-unit index 6c1aec63..52ed6ede 100755 --- a/tools/setup-unit +++ b/tools/setup-unit @@ -9,11 +9,13 @@ 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 echo "You're probably running on macOS. We recommend that you either"; - >&2 echo 'install a newer version of bash(1) or run this script with'; - >&2 echo 'another shell, such as zsh(1):'; - >&2 echo " $ zsh ${SUDO_USER:+sudo }$0 ..."; + >&2 cat <<__EOF__ ; +Your version of bash(1) isn't supported by this script. You're probably +running on macOS. We recommend that you either install a newer version +of bash(1) or run this script with another shell, such as zsh(1): + + $ zsh ${SUDO_USER:+sudo }$0 ... +__EOF__ exit 1; fi; |