2012-12-12 08:55:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-12-12 10:41:12 +00:00
|
|
|
# Get OS X software updates, update Homebrew, NPM, Ruby packages, dotfiles and some other software
|
2012-12-12 08:55:22 +00:00
|
|
|
|
|
|
|
function header() {
|
|
|
|
echo -e "$(tput sgr 0 1)$(tput setaf 6)$1$(tput sgr0)"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Ask for the administrator password upfront
|
|
|
|
sudo -v
|
|
|
|
echo
|
|
|
|
|
|
|
|
# Dotfiles
|
|
|
|
header "Updating dotfiles..."
|
2013-02-20 11:43:07 +00:00
|
|
|
pushd "$HOME/dotfiles"
|
2012-12-12 08:55:22 +00:00
|
|
|
git pull
|
|
|
|
./sync.py
|
|
|
|
source "$HOME/.bashrc"
|
2013-02-20 11:43:07 +00:00
|
|
|
popd
|
2012-12-12 08:55:22 +00:00
|
|
|
echo
|
|
|
|
|
|
|
|
# OS X
|
|
|
|
header "Updating OS X..."
|
2013-02-24 19:24:34 +00:00
|
|
|
sudo -v
|
2012-12-12 08:55:22 +00:00
|
|
|
sudo softwareupdate -i -a
|
|
|
|
echo
|
|
|
|
|
|
|
|
# Homebrew
|
|
|
|
header "Updating Homebrew..."
|
2013-02-24 19:24:34 +00:00
|
|
|
sudo -v
|
2012-12-12 08:55:22 +00:00
|
|
|
brew update
|
|
|
|
brew upgrade
|
|
|
|
brew cleanup
|
|
|
|
echo
|
|
|
|
|
|
|
|
# NPM
|
|
|
|
header "Updating NPM..."
|
2013-02-24 19:24:34 +00:00
|
|
|
sudo -v
|
2012-12-12 08:55:22 +00:00
|
|
|
npm update npm -g
|
|
|
|
npm update -g
|
|
|
|
echo
|
|
|
|
|
|
|
|
# Ruby gems
|
|
|
|
header "Updating Ruby gems..."
|
2013-02-24 19:24:34 +00:00
|
|
|
sudo -v
|
2012-12-12 08:55:22 +00:00
|
|
|
sudo gem update
|
|
|
|
echo
|
|
|
|
|
|
|
|
# Python
|
|
|
|
header "Updating Python packages..."
|
2013-02-24 19:24:34 +00:00
|
|
|
sudo -v
|
2012-12-12 08:55:22 +00:00
|
|
|
sudo pip install --upgrade fabric
|
|
|
|
echo
|
|
|
|
|
|
|
|
# git-friendly
|
|
|
|
header "Updating git-friendly..."
|
2013-02-24 19:24:34 +00:00
|
|
|
sudo -v
|
2012-12-12 08:55:22 +00:00
|
|
|
sudo bash < <( curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
|
|
|
|
echo
|
|
|
|
|
|
|
|
# Nyan cat! Yay!
|
|
|
|
nyan
|