Shell scripts for automated OS X machine setup.
Table of Contents
- Additional Software
- Code of Conduct
- Provides a command line interface for installation and management of OSX software.
Downloads, installs, and configures Homebrew command line software:
- OpenSSL OSX CA
- GPG Agent
- Bash Completion
- Colorized Cat
- Reattach to User Namespace
- The Silver Surfer
- Pipe Viewer
- Network Grep
- Terminal Notifier
Downloads, installs, and configures software applications generally not in the App Store:
- Sublime Text 3
- Sublime Text URL Handler
- Path Finder
- Tor Browser
- Google Chrome
- iStat Menus
- SurfEasy VPN
- App Cleaner
- Carbon Copy Cloner
- QuickLook Plain Text
- Downloads, installs, and configures software extensions:
- Vim Pathogen
- Vim Fugitive
- Vim Unimpaired
- Vim Commentary
- Vim Git Gutter
- Vim Bundler
- Vim Ruby
- Vim Text Object User
- Vim Text Object Ruby Block
- Vim Rails
- Sublime Text 3 Git Gutter
- Sublime Text 3 Gist
- Sublime Text 3 Keymaps
- Sublime Text 3 Local History
- Sublime Text 3 CTags
- Sublime Text 3 Sidebar Enhancements
- Sublime Text 3 Advanced New File
- Sublime Text 3 Move Tab
- Sublime Text 3 Apply Syntax
- Sublime Text 3 Change Quotes
- Sublime Text 3 Bracket Highlighter
- Sublime Text 3 Trailing Spaces
- Sublime Text 3 Gutter Color
- Sublime Text 3 Color Highlighter
- Sublime Text 3 Alignment
- Sublime Text 3 Wrap+
- Sublime Text 3 AutoFileName
- Sublime Text 3 Autoprefixer
- Sublime Text 3 Easy Motion
- Sublime Text 3 Emmet
- Sublime Text 3 Emmet LiveStyle
- Sublime Text 3 Elm
- Sublime Text 3 Web Inspector
- Sublime Text 3 Sublime Linter
- Sublime Text 3 JSCS Linter
- Sublime Text 3 JSCS Formatter
- Sublime Text 3 Ruby Extract Method
- Sublime Text 3 Ruby Slim
- Sublime Text 3 Rubocop
- Sublime Text 3 Markdown Extended
- Sublime Text 3 SCSS
- Sublime Text 3 SCSS Lint
- Sublime Text 3 CSScomb
- Sublime Text 3 Coffee Script
- Sublime Text 3 HTML Prettify
- Sublime Text 3 DashDoc
- Sublime Text 3 Table Editor
- OS X
- OS X Software Updates
- Xcode (with accepted license agreement)
- Command Line Tools for Xcode
- Java SE Development Kit
OS X (El Capitan)
- Insert a USB drive (8GB or higher is best).
- Open Disk Utility and format the USB drive (leave the label as "Untitled").
- Download OS X El Capitan via the App Store but DO NOT INSTALL.
Run this command to turn the USB drive into bootable image:
sudo "/Applications/Install OS X El Capitan.app/Contents/Resources/createinstallmedia" --volume /Volumes/Untitled --applicationpath "/Applications/Install OS X El Capitan.app" --nointeraction
- Exit the OS X El Capitan install.
- Eject the USB drive.
- Insert the USB bootdisk into the machine to be upgraded.
- Reboot the machine.
- Hold down the OPTION key while the machine is rebooting.
- Select the USB bootdisk from the menu.
- Format the machine using Disk Utility.
- Install the new OS.
If you have already installed OS X but want to reinstall it, simply reboot the machine and hold down COMMAND+R. This will load the installer from the recovery partition and allow you to use Disk Utility, reinstall the system, etc.
Open a terminal window and execute one of the following setup sequences depending on your version preference:
Current Version (stable):
git clone git://github.com/bkuhlmann/osx.git cd osx git checkout v13.0.0
Master Version (unstable):
git clone git://github.com/bkuhlmann/osx.git cd osx
Edit any of the *.sh files in the
scripts folder to your liking and then open a terminal window to execute the
Running the run.sh script will present the following options:
Setup: b: Apply basic system settings. h: Install Homebrew software. a: Install application software. x: Install application extensions. d: Apply software defaults. s: Setup and configure installed software. i: Install everything (i.e. executes all options, listed above, top to bottom). Manage: c: Check status of managed software. C: Caffeinate machine. ua: Uninstall application software. ux: Uninstall application extension. ra: Reinstall application software. rx: Reinstall application extension. w: Clean work (temp) directory. q: Quit/Exit.
Choose option 'i' to run all install tasks or select a specific option to run a single task. Each task is designed to be re-run if necessary. This can also be handy for performing upgrades, re-running a missing/failed install, etc.
The options prompt can be skipped by passing the desired option directly to the run.sh script. For example, executing "./run.sh i" will execute the complete software install process.
It is recommended that the machine be rebooted after all install tasks have completed. Feel free to delete the osx project directory afterwards...or keep it around for future upgrades.
While the default settings for this project are opinionated and tailored for my specific setup, you can easily fork this project and customize the settings to your specific environment. Start by editing the files located in the settings project:
- settings/settings.sh = Defines settings for machine name, applications, extensions, versions, paths, etc.
TIP: The installer determines which applications/extensions to install as defined by the settings.sh script. Applications defined with the "APP_NAME" suffix and extensions defined with the "EXTENSION_PATH" suffix inform the installer what to care about. Removing/commenting out these applications/extensions within the settings.sh file will cause the installer to skip these applications/extensions.
You can also modify the install scripts themselves by editing any of the following:
- scripts/basic.sh = Applies basic system settings.
- scripts/homebrew.sh = Installs Homebrew, command line, software.
- scripts/applications.sh = Installs OS X, GUI-based, applications.
- scripts/extensions.sh = Installs application extensions.
- scripts/defaults.sh = Applies system and application defaults.
- scripts/setup.sh = Configures and launches (if necessary) installed software.
All Bash functions, used by the scripts defined above, can be found in the
lib folder of this project.
I also recommend installing the following software found via the App Store:
- Marked 2
- Name Mangler
- Cocoa JSON Editor
- Key Codes
- Day One
- WiFi Explorer
The following software is optional:
- Hardware IO Tools for Xcode - Includes the Network Link Conditioner, etc.
- VMWare Fusion (requires a registered account, download only)
- Logitech Harmony Remote
The following are additional steps, not easily automated, that are worth completing after the install scripts have been executed:
- Configure System Preferences:
- Security & Privacy:
- Require password immediately after sleep or screen saver begins.
- Show contact info when screen is locked. Example:
<twitter> | <email> | <phone> | <url>.
- Allow apps downloaded from App Store and identified developers.
- Enable FileVault and save the recovery key in a secure location (i.e. 1Password).
- Enabled it.
- Automatically allow signed software.
- Enable stealth mode.
- Apps like Cheat Sheet, Dash, Dropbox, Trailer, etc. will need to be enabled for accessibility.
- Printers & Scanners:
- Add printer/scanner.
- Enable Find My Mac.
- Internet Accounts:
- Add all accounts used by Mail.
- Configure Wi-Fi.
- Users & Groups:
- Update avatar.
- Remove unused login items.
- Security & Privacy:
Read Semantic Versioning for details. Briefly, it means:
- Patch (x.y.Z) - Incremented for small, backwards compatible bug fixes.
- Minor (x.Y.z) - Incremented for new, backwards compatible public API enhancements and/or bug fixes.
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
Code of Conduct
Please note that this project is released with a CODE OF CONDUCT. By participating in this project you agree to abide by its terms.
Read CONTRIBUTING for details.