diff options
author | Robby Russell <robby@planetargon.com> | 2015-06-05 08:03:24 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2015-06-05 08:03:24 -0700 |
commit | cb89fcd8d6b940d2d490c7791b2b5859672a5dc5 (patch) | |
tree | 50a2357135b3b228c0844c06b40477a477b3cd1b | |
parent | 11c7baf5784cb44f19bc6d9a24cf51d4267686f1 (diff) | |
parent | 03b8c199e591de73de3824fc6b366138964c1ba6 (diff) | |
download | zsh-cb89fcd8d6b940d2d490c7791b2b5859672a5dc5.tar.gz zsh-cb89fcd8d6b940d2d490c7791b2b5859672a5dc5.tar.bz2 zsh-cb89fcd8d6b940d2d490c7791b2b5859672a5dc5.zip |
Merge pull request #2836 from ptamarit/chsh-etc-shells
Install script's chsh not working on Fedora
-rwxr-xr-x | tools/install.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/install.sh b/tools/install.sh index bd4c55749..c83a6f23d 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -32,10 +32,12 @@ sed -i -e "/export PATH=/ c\\ export PATH=\"$PATH\" " ~/.zshrc -if [ "$SHELL" != "$(which zsh)" ]; then +TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)') +if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then echo "\033[0;34mTime to change your default shell to zsh!\033[0m" - chsh -s `which zsh` + chsh -s $(grep /zsh$ /etc/shells | tail -1) fi +unset TEST_CURRENT_SHELL echo "\033[0;32m"' __ __ '"\033[0m" echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" |