mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 08:50:08 +00:00
Fixing conflict in install scripts
This commit is contained in:
parent
d19e01b140
commit
dfbafe6d58
2 changed files with 14 additions and 7 deletions
|
@ -14,8 +14,7 @@ echo "\033[0;34mLooking for an existing zsh config...\033[0m"
|
||||||
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
|
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
|
||||||
then
|
then
|
||||||
echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m";
|
echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m";
|
||||||
cp ~/.zshrc ~/.zshrc.pre-oh-my-zsh;
|
mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh;
|
||||||
rm ~/.zshrc;
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m"
|
echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m"
|
||||||
|
|
|
@ -4,12 +4,20 @@ then
|
||||||
rm -rf ~/.oh-my-zsh
|
rm -rf ~/.oh-my-zsh
|
||||||
fi
|
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 ]
|
if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]
|
||||||
then
|
then
|
||||||
echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh";
|
echo "Found ~/.zshrc.pre-oh-my-zsh -- Restoring to ~/.zshrc";
|
||||||
rm ~/.zshrc;
|
|
||||||
cp ~/.zshrc.pre-oh-my-zsh ~/.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;
|
source ~/.zshrc;
|
||||||
else
|
else
|
||||||
echo "Switching back to bash"
|
echo "Switching back to bash"
|
||||||
|
@ -17,4 +25,4 @@ else
|
||||||
source /etc/profile
|
source /etc/profile
|
||||||
fi
|
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."
|
||||||
|
|
Loading…
Reference in a new issue