fix: backup may fail

This commit is contained in:
Renge 2022-01-03 01:05:37 -05:00
parent 72eb9d6c72
commit 654d9adac6

View File

@ -12,12 +12,13 @@ verify () {
done
}
time="$(date +%y%m%d_%H%M%S)"
# ---------------- zshrc start ----------------
echo "setting up zsh"
if [ -e ~/.zshrc ]
then
echo "~/.zshrc exists, backup to ./zshrc_backup"
mv ~/.zshrc ./zshrc_backup
echo "~/.zshrc exists, backup to ./zshrc_backup-$time"
mv ~/.zshrc ./zshrc_backup-$time
fi
ln ./zshrc ~/.zshrc