fix: backup may fail
This commit is contained in:
parent
72eb9d6c72
commit
654d9adac6
5
setup.sh
5
setup.sh
|
@ -12,12 +12,13 @@ verify () {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time="$(date +%y%m%d_%H%M%S)"
|
||||||
# ---------------- zshrc start ----------------
|
# ---------------- zshrc start ----------------
|
||||||
echo "setting up zsh"
|
echo "setting up zsh"
|
||||||
if [ -e ~/.zshrc ]
|
if [ -e ~/.zshrc ]
|
||||||
then
|
then
|
||||||
echo "~/.zshrc exists, backup to ./zshrc_backup"
|
echo "~/.zshrc exists, backup to ./zshrc_backup-$time"
|
||||||
mv ~/.zshrc ./zshrc_backup
|
mv ~/.zshrc ./zshrc_backup-$time
|
||||||
fi
|
fi
|
||||||
ln ./zshrc ~/.zshrc
|
ln ./zshrc ~/.zshrc
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user