Skip to content

Commit 99a7fa7

Browse files
Tools: Using HereDoc instead of echo(1).
This prevents accidents, which are likely to happen especially with quotes. Signed-off-by: Alejandro Colomar <[email protected]>
1 parent aaba6fd commit 99a7fa7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tools/setup-unit

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99

1010

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

0 commit comments

Comments
 (0)