diff options
author | Zach Whitten <zwhitten@gmail.com> | 2017-10-13 14:33:22 -0400 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2019-06-03 17:18:25 +0200 |
commit | 2e54ba2dfb95890c6ea32323ae14486ffc1c46ed (patch) | |
tree | 36fefd7050b99b34e0e2edf150b89f98b2eb45e4 /tools/install.sh | |
parent | 66d6d08841ebde3610eaee961f63f8420e914d3b (diff) | |
download | zsh-2e54ba2dfb95890c6ea32323ae14486ffc1c46ed.tar.gz zsh-2e54ba2dfb95890c6ea32323ae14486ffc1c46ed.tar.bz2 zsh-2e54ba2dfb95890c6ea32323ae14486ffc1c46ed.zip |
installer: restore previous default shell with uninstall
Co-authored-by: Antonio QUINTAVALLE <antonio.quintavalle@amadeus.com>
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
Diffstat (limited to 'tools/install.sh')
-rwxr-xr-x | tools/install.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/install.sh b/tools/install.sh index 3f0e468fe..15c7b7703 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -184,6 +184,13 @@ setup_shell() { fi fi + # We're going to change the default shell, so back up the current one + if [ -n $SHELL ]; then + echo $SHELL > ~/.shell.pre-oh-my-zsh + else + grep "^$USER:" /etc/passwd | awk -F: '{print $7}' > ~/.shell.pre-oh-my-zsh + fi + # Actually change the default shell to zsh if ! chsh -s "$zsh"; then error "chsh command unsuccessful. Change your default shell manually." |