Skip to content

A bash script to properly update your macOS installation(MAS, Homebrew, PIP, Ruby) all at once.

Notifications You must be signed in to change notification settings

cansurmeli/system-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macOS System Updater

A simple-to-use CLI utility to properly update your macOS installation all at once.

Why Properly Updated

Once you want to do a full update of your macOS installation, there occurs various struggles:

  1. GUI hassles: Some updates can be accomplished by their respective GUIs, however, it's cumbersome; especially the Mac App Store which still doesn't reflect the changes properly,
  2. Complex Commands: Even though some commands are easy to type, others can be more elaborate,
  3. Keeping track of caches: These commands fill up their caches that needs to be cleaned regularly which is another thing for you to keep track of,
  4. Time lost: If you're manually entering these commands, you're going to have to wait in between them; losing time.

With all these hassles, it could be that someone might not update their system too often; not because they can't but they don't want to deal with it. Or it could be that they're forgetting something; e.g. cache cleanups.

Hence, this script was created. So that people can properly update their macOS installation.

It goes through major things that can be on a macOS installation and updates them properly/throughly.

Why sudo is requested

This script asks for your sudo password!

Full disclosure:

  • the script itself doesn't require sudo itself but the Python and Ruby stuff makes use of it,
  • the script doesn't messes around with your sudo password; feel free to check the source code.

What's Updated

  • Homebrew
  • App Store apps
  • macOS
  • Python 2
  • PIP 2 packages
  • Ruby
  • RVM

Python 3 and PIP 3 are updated by Homebrew if you've installed them from Homebrew which is mostly the case.

Requirements

  • Homebrew
  • mas: required for updating the Mac App Store apps from the CLI. If you don't have it:
    • brew install mas

Usage

update [OPTIONS] [ENV]

Options

  • -h, --help: See a synopsis.
  • -o, --output: Output the logs to a given file.
  • -v, --verbose: While updating, be verbose & output what's being generated by each and every command. The default is that merely the main command entrances and exits will be displayed.

Update Environments

  • macos
  • mas
  • homebrew
  • ruby
  • rvm
  • python2
  • pip
  • system(all of the above combined)

Usage Examples

Updating everything:

update system

Update everything, be verbose, and log to the given location:

update -o ~/Desktop/update.log -v system

Just update Ruby & PIP:

update ruby pip

Be verbose and show what's going on while updating:

update -v

To Be Implemented

  • Allow carry on without providing sudo and hence ask it later,
  • Implement logging,
  • Implement verbose operation,
  • Implement the usage cases of the command line argument.

Known Issues

  • Updating the Python packages is throwing an error,
  • Updating the Ruby gems is still problematic even if sudo is granted,

About

A bash script to properly update your macOS installation(MAS, Homebrew, PIP, Ruby) all at once.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages