mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
Fixing conflict in install scripts
This commit is contained in:
committed by
Robby Russell
parent
d19e01b140
commit
dfbafe6d58
@@ -4,12 +4,20 @@ then
|
||||
rm -rf ~/.oh-my-zsh
|
||||
fi
|
||||
|
||||
echo "Looking for an existing zsh config..."
|
||||
echo "Looking for original zsh config..."
|
||||
if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]
|
||||
then
|
||||
echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh";
|
||||
rm ~/.zshrc;
|
||||
cp ~/.zshrc.pre-oh-my-zsh ~/.zshrc;
|
||||
echo "Found ~/.zshrc.pre-oh-my-zsh -- Restoring to ~/.zshrc";
|
||||
|
||||
if [ -f ~/.zshrc ] || [ -h ~/.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.pre-oh-my-zsh ~/.zshrc;
|
||||
|
||||
source ~/.zshrc;
|
||||
else
|
||||
echo "Switching back to bash"
|
||||
@@ -17,4 +25,4 @@ else
|
||||
source /etc/profile
|
||||
fi
|
||||
|
||||
echo "Thanks for trying out Oh My Zsh. It's been uninstalled."
|
||||
echo "Thanks for trying out Oh My Zsh. It's been uninstalled."
|
||||
|
||||
Reference in New Issue
Block a user