Last active
February 24, 2016 01:36
-
-
Save boogah/10262a06c8b2ba41bbbe to your computer and use it in GitHub Desktop.
One command to upgrade npm, Atom packages & Homebrew. Based on http://blog.thibmaekelbergh.be/2015/12/15/5-minute-guide-to-keeping-your-system-updated.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: You won't have access to this command until you run `source ~/.bash_profile` or log back in! | |
# Call this from cron or run manually as needed. | |
function update() { | |
echo "" ; echo "`date`: RUNNING: npm update" | |
npm install npm -g # Update npm itself | |
echo "`date`: FINISHED: npm update" ; echo "" ; echo "`date`: RUNNING: npm package updates" | |
npm update -g # Update installed npm packages | |
echo "`date`: FINISHED: npm package updates" ; echo "" ; echo "`date`: RUNNING: atom update" | |
apm upgrade -c false # Update Atom packages & themes | |
echo "`date`: FINISHED: atom update" ; echo "" ; echo "`date`: RUNNING: brew update" | |
brew update # Update Homebrew | |
echo "`date`: FINISHED: brew update" ; echo "" ; echo "`date`: RUNNING: brew upgrade" | |
brew upgrade --all # Update Homebrew taps & bottles | |
echo "`date`: FINISHED: brew upgrade" ; echo "" ; echo "`date`: RUNNING: brew cleanup" | |
brew cleanup # Clear Homebrew cache | |
echo "`date`: FINISHED: brew cleanup" | |
} |
Mine looks like:
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use this but i've cleaned up a ton of it since
https://github.com/jasontucker/dotfiles