summaryrefslogtreecommitdiff
path: root/tools/uninstall.sh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2021-03-16 14:46:40 -0600
committerTuowen Zhao <ztuowen@gmail.com>2021-03-16 14:46:40 -0600
commit0a67be1024b1e54b6af59f01b01ceace9fdf7bb2 (patch)
tree2e989a1c283cc942312222d1afecd28640c5315b /tools/uninstall.sh
parent0f2bface6494ae546ea83cbf45b65a18dbc0c4fb (diff)
parent95a06f3927a286db257dc99791b02caba757fe33 (diff)
downloadzsh-0a67be1024b1e54b6af59f01b01ceace9fdf7bb2.tar.gz
zsh-0a67be1024b1e54b6af59f01b01ceace9fdf7bb2.tar.bz2
zsh-0a67be1024b1e54b6af59f01b01ceace9fdf7bb2.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'tools/uninstall.sh')
-rw-r--r--tools/uninstall.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/uninstall.sh b/tools/uninstall.sh
index b327a0163..6a0e7b4c7 100644
--- a/tools/uninstall.sh
+++ b/tools/uninstall.sh
@@ -9,20 +9,20 @@ if [ -d ~/.oh-my-zsh ]; then
rm -rf ~/.oh-my-zsh
fi
+if [ -e ~/.zshrc ]; then
+ ZSHRC_SAVE=~/.zshrc.omz-uninstalled-$(date +%Y-%m-%d_%H-%M-%S)
+ echo "Found ~/.zshrc -- Renaming to ${ZSHRC_SAVE}"
+ mv ~/.zshrc "${ZSHRC_SAVE}"
+fi
+
echo "Looking for original zsh config..."
ZSHRC_ORIG=~/.zshrc.pre-oh-my-zsh
if [ -e "$ZSHRC_ORIG" ]; then
echo "Found $ZSHRC_ORIG -- Restoring to ~/.zshrc"
-
- if [ -e ~/.zshrc ]; then
- ZSHRC_SAVE=~/.zshrc.omz-uninstalled-$(date +%Y-%m-%d_%H-%M-%S)
- echo "Found ~/.zshrc -- Renaming to ${ZSHRC_SAVE}"
- mv ~/.zshrc "${ZSHRC_SAVE}"
- fi
-
mv "$ZSHRC_ORIG" ~/.zshrc
-
echo "Your original zsh config was restored."
+else
+ echo "No original zsh config found"
fi
if hash chsh >/dev/null 2>&1 && [ -f ~/.shell.pre-oh-my-zsh ]; then