Bug fix directory not found, when upgrading from old setup
This commit is contained in:
14
install.sh
14
install.sh
@@ -10,11 +10,15 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if mv -n ~/.zshrc ~/.zshrc-backup-$(date +"%Y-%m-%d"); then # backup .zshrc
|
if mv -n ~/.zshrc ~/.zshrc-backup-$(date +"%Y-%m-%d"); then # backup .zshrc
|
||||||
echo -e "Backed up the current .zshrc to .zshrc-backup-date\n"
|
echo -e "Backed up the current .zshrc to .zshrc-backup-date\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p ~/.config/ezsh # the setup will be installed in here
|
||||||
|
|
||||||
|
if [ -d ~/.quickzsh ]; then
|
||||||
|
echo -e "\n PREVIOUS SETUP FOUND AT '~/.quickzsh'. PLEASE MANUALLY MOVE ANY FILES YOU'D LIKE TO '~/.config/ezsh' \n"
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "Installing oh-my-zsh\n"
|
echo -e "Installing oh-my-zsh\n"
|
||||||
if [ -d ~/.config/ezsh/oh-my-zsh ]; then
|
if [ -d ~/.config/ezsh/oh-my-zsh ]; then
|
||||||
@@ -29,14 +33,6 @@ else
|
|||||||
git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh.git ~/.config/ezsh/oh-my-zsh
|
git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh.git ~/.config/ezsh/oh-my-zsh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -d ~/.quickzsh ]; then
|
|
||||||
echo -e "The setup was installed at '~/.quickzsh'. Moving it to '~/.config/ezsh' \n"
|
|
||||||
mv ~/.quickzsh ~/.config/ezsh
|
|
||||||
else
|
|
||||||
mkdir -p ~/.config/ezsh # external plugins, things, will be instlled in here
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -f .zshrc ~/
|
cp -f .zshrc ~/
|
||||||
cp -f ezshrc.zsh ~/.config/ezsh/
|
cp -f ezshrc.zsh ~/.config/ezsh/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user