diff options
| author | Probably Not <probablynot@gmail.com> | 2012-08-04 11:41:47 -0700 | 
|---|---|---|
| committer | Robby Russell <robby@planetargon.com> | 2012-12-02 13:08:06 -0800 | 
| commit | dfbafe6d58bf1463df393fd4478154be36a675aa (patch) | |
| tree | 56c61b13f6246dd8c74a080850ecd06651f98977 /tools | |
| parent | d19e01b14086319abae80e7624a8192025e88572 (diff) | |
| download | zsh-dfbafe6d58bf1463df393fd4478154be36a675aa.tar.gz zsh-dfbafe6d58bf1463df393fd4478154be36a675aa.tar.bz2 zsh-dfbafe6d58bf1463df393fd4478154be36a675aa.zip | |
Fixing conflict in install scripts
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/install.sh | 3 | ||||
| -rw-r--r-- | tools/uninstall.sh | 18 | 
2 files changed, 14 insertions, 7 deletions
| diff --git a/tools/install.sh b/tools/install.sh index 6f58db939..41f83e354 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -14,8 +14,7 @@ echo "\033[0;34mLooking for an existing zsh config...\033[0m"  if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]  then    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; -  rm ~/.zshrc; +  mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh;  fi  echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" diff --git a/tools/uninstall.sh b/tools/uninstall.sh index 8ff583322..41d601576 100644 --- a/tools/uninstall.sh +++ b/tools/uninstall.sh @@ -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."
\ No newline at end of file +echo "Thanks for trying out Oh My Zsh. It's been uninstalled." | 
