Skip to content

A shell script to set up a macOS laptop for development.

License

Notifications You must be signed in to change notification settings

deild/mac-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mac Bootstrap shellcheck MIT

Your laptop is your sword. Don't go into battle without it.

dotfiles screenshot

Forked & Inspired by from joshukraine's mac-bootstrap

Bootstrap is a script to provision a new machine running a fresh install of (macOS Big Sur).

It can be run multiple times on the same machine safely. It installs, upgrades, or skips packages based on what is already installed on the machine.

The bootstrap script is very specific to the Mac platform. Version 1.x has been successfully tested on the following versions of macOS:

  • Big Sur (11.0)
  • Catalina (10.15)

Older versions may work but are not tested regularly. Bug reports into a new GitHub Issue for older versions are welcome.

Install

Download the script:

curl -fsSO https://raw.githubusercontent.com/deild/mac-bootstrap/main/bootstrap

Review the script (avoid running scripts you haven't read!):

less bootstrap

Execute the downloaded script:

zsh bootstrap 2>&1 | tee ~/.bootstrap.log

Optionally, review the log:

less ~/.bootstrap.log

Or to install with a one-liner, run this:

curl -fsS https://raw.githubusercontent.com/deild/mac-bootstrap/main/bootstrap | zsh -s -- 2>&1 | tee ~/.bootstrap.log

Debugging

Your last bootstrap run will be saved to ~/.bootstrap.log. Read through it to see if you can debug the issue yourself. If not, copy the lines where the script failed into a new GitHub Issue for us. Or, attach the whole log file as an attachment.

What it sets up

When you invoke bootstrap, here's what it does:

  1. Set the timezone to Europe/Paris
  2. Set computer name to Higuma
  3. Ensure Apple's command line tools are installed, and install it if not
  4. Disable or enable Gatekeeper control
  5. Install or update Homebrew
  6. Install or upgrade formula dependencies
  7. Install or upgrade cask
  8. Install or upgrade and then reload dotfiles
  9. Check which Ruby and Gem installs we are using at this point
  10. Generate ed25519 and RSA key
  11. Prefer tools installed by Homebrew according to the PATH environment variable
  12. Disable Homebrew analytics
  13. Set macOS preferences