helm/bin/update

36 lines
703 B
Plaintext
Raw Normal View History

#!/usr/bin/env zsh
2013-03-21 19:25:43 -07:00
2013-03-23 01:02:58 -07:00
# Ask for the administrator password upfront
2013-03-22 10:21:05 -07:00
sudo -v
2013-03-23 01:02:58 -07:00
# Keep-alive: update existing `sudo` time stamp until script is done
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
cd ~/.dotfiles
echo "Updating ALL the things!"
2013-03-21 19:25:43 -07:00
2013-03-22 13:06:11 -07:00
# Update these scripts!
2013-03-22 18:09:52 -07:00
echo-g "==> Updating dotfiles"
2013-03-23 01:56:28 -07:00
git pull
2013-03-22 10:21:05 -07:00
# Updating the system with it's package manager (brew, apt-get, etc.)
2013-03-22 18:09:52 -07:00
echo-g "==> Updating installed packages"
2013-03-23 01:56:28 -07:00
pkg-update
2013-03-22 10:17:58 -07:00
2013-03-22 18:09:52 -07:00
echo-g "==> Updating zsh, rvm and vim"
2013-03-22 13:06:11 -07:00
# Then the rest
install/zsh
echo
# Only update rvm is it is installed
if is_mac && command_exists rvm; then
2013-04-12 17:32:35 -07:00
install/rvm
echo
fi
if [ -d ~/.vim ]; then
install/vim
fi
2013-03-22 18:09:52 -07:00
echo-g "==> All done!"