Skip to content

Instantly share code, notes, and snippets.

@chulkilee
Last active January 1, 2016 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chulkilee/8213022 to your computer and use it in GitHub Desktop.
Save chulkilee/8213022 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "# Update brew"
brew update && brew upgrade
brew doctor
brew cleanup
echo "# Update ruby gem"
gem update --system && gem update
echo "# Update npm"
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
npm -g install "$package"
done
# add following line with visudo to avoid password prompt
# %admin ALL=(ALL) NOPASSWD: /usr/sbin/softwareupdate
echo "# Perform Software Update"
sudo softwareupdate -i -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment