Merge pull request #23 from jotyGill/develop

Bug fix directory not found, when upgrading from old setup
This commit is contained in:
jotyGill
2022-04-29 08:06:38 +00:00
committed by GitHub

View File

@@ -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/