From 2e54ba2dfb95890c6ea32323ae14486ffc1c46ed Mon Sep 17 00:00:00 2001 From: Zach Whitten Date: Fri, 13 Oct 2017 14:33:22 -0400 Subject: installer: restore previous default shell with uninstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Antonio QUINTAVALLE Co-authored-by: Marc Cornellà --- tools/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/install.sh') 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." -- cgit v1.2.3-70-g09d2