Skip to content

Latest commit

 

History

History
112 lines (77 loc) · 2.6 KB

File metadata and controls

112 lines (77 loc) · 2.6 KB

BuildStatus

mac-setup

mac-setup is a script to set up an macOS laptop for web development.

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 script is a modified version of the Laptop project by Thoughtbot.

Requirements

We support:

  • macOS Sierra (10.12)

Older versions may work but aren't regularly tested. Bug reports for older versions are welcome.

Install

Download, review, then execute the script:

curl --remote-name https://raw.githubusercontent.com/rightmove/mac-setup/master/setup
./setup 2>&1 | tee ~/laptop.log

You may need to chmod the file to give it permissions on your machine.

Debugging

Your last Laptop run will be saved to ~/laptop.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

macOS tools:

  • Homebrew for managing operating system libraries.

Unix tools:

  • Git for version control
  • OpenSSL for Transport Layer Security (TLS)

TODO need to put links to the rest of the dependencies

It should take less than 15 minutes to install (depends on your machine).

Customize in ~/.laptop.local

Your ~/.laptop.local is run at the end of the Laptop script. Put your customizations there. For example:

#!/bin/sh

brew bundle --file=- <<EOF
brew "go"
brew "ngrok"
brew "watch"
EOF

fancy_echo "Cleaning up old Homebrew formulae ..."
brew cleanup
brew cask cleanup

if [ -r "$HOME/.rcrc" ]; then
  fancy_echo "Updating dotfiles ..."
  rcup
fi

Write your customizations such that they can be run safely more than once. See the setup script for examples.

Laptop functions such as fancy_echo can be used in your ~/.laptop.local.

Contributing

Edit the setup file. Document in the README.md file. Follow shell style guidelines by using ShellCheck and Syntastic.

brew install shellcheck

Thank you, contributors!