2022-07-04 16:06:23 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Dotfiles upgrade script that just pulls new dotfiles from repo
|
|
|
|
# oh-my-zsh update included!
|
|
|
|
|
|
|
|
CURRENTDIR="$(pwd)"
|
|
|
|
|
|
|
|
cd $HOME/.dotfiles
|
2022-08-09 11:27:28 +03:00
|
|
|
echo "1) Upgrading dotfiles"
|
2022-07-09 18:28:02 +03:00
|
|
|
|
|
|
|
# ignore local changes
|
|
|
|
|
|
|
|
git reset --hard HEAD > /dev/null 2>&1
|
|
|
|
|
2022-07-09 18:30:44 +03:00
|
|
|
if git pull > /dev/null 2>&1
|
2022-07-05 08:26:29 +03:00
|
|
|
then
|
|
|
|
echo "$HOME/.dotfiles synced"
|
|
|
|
else
|
|
|
|
echo "$HOME/.dotfiles couldn't be 'git pull'ed, check your connection to internet or run tools/reinstall.sh"
|
|
|
|
exit 1
|
2022-07-09 17:46:55 +03:00
|
|
|
fi
|
2022-07-04 16:06:23 +03:00
|
|
|
sh tools/relink.sh
|
2022-08-09 11:27:28 +03:00
|
|
|
echo "2) Upgrading oh-my-zsh"
|
2022-07-04 16:06:23 +03:00
|
|
|
zsh -c "source $ZSH/oh-my-zsh.sh && omz update" > /dev/null
|
2022-08-09 11:27:28 +03:00
|
|
|
cd $CURRENTDIR
|