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
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user