installer: make sure shell in /etc/shells is not commented
Otherwise we risk a situation where a full path to `zsh` is commented, i.e.:
#/usr/local/bin/zsh
Diff
1diff --git a/tools/install.sh b/tools/install.sh
2index 659cd944706c43a16fea11d1f469313a40caf1b6..7eea2e748788a019a289294231f2a44a36998f94 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -97,7 +97,7 @@ setup_shell() {
6 # If this platform provides a "chsh" command (not Cygwin), do it, man!
7 if command_exists chsh; then
8 echo "${BLUE}Time to change your default shell to zsh!${NORMAL}"
9- if ! chsh -s $(grep /zsh$ /etc/shells | tail -1); then
10+ if ! chsh -s $(grep '^/.*/zsh$' /etc/shells | tail -1); then
11 error "chsh command unsuccessful. Change your default shell manually."
12 fi
13 # Else, suggest the user do so manually.