A shell script to set up a macOS machine for design and development.
Safe to run multiple times on the same machine. It installs, upgrades, or skips packages based on what is already installed on the machine.
Installation
Download the script:
git clone https://github.com/minamarkham/formation.git && cd formation
Review the script (please don't run scripts you don't understand):
less slay
Slay:
sh slay 2>&1 | tee ~/formation.log
Optionally, review the log:
less ~/formation.log
What you get
Basic tools:
- XCode Command Line Tools for developer essentials.
- Bash-it, for a more powerful bash.
- Git for version control
- Homebrew for managing operating system libraries.
Check swag
for the full list of apps installed
Just add ~./hot-sauce!
Your ~/.hot-sauce
is added at the end of your Formation. Put your customizations there.
#!/usr/bin/env bash
SLAY_SCREENSHOTS="$HOME/Desktop/screenshots"
DIRECTORIES=(
$HOME/Desktop/code
$HOME/Desktop/design
$HOME/Desktop/*dump
$HOME/Desktop/GIFs
$HOME/Desktop/projects
$HOME/Desktop/screenshots
)
step "Making directories…"
for dir in ${DIRECTORIES[@]}; do
mkd $dir
done
echo "${indent} ︎︎❤︎ Configuring screenshots…"
defaults write com.apple.screencapture type jpg
defaults write com.apple.screencapture location $SLAY_SCREENSHOTS
killall SystemUIServer
Write your customizations such that they can be run safely more than once. See the slay
script for examples. Formation functions such as print_success
and install_brews
can be used in your ~/.hot-sauce
.
Debugging
Your last Formation run will be saved to ~/formation.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. Or, attach the whole log file as an attachment.
Acknowledgements
Inspired by thoughtbot's laptop, Mathias Bynens' dotfiles, Cătălin Mariș's dotfiles and more.
Get your machines in formation.
Tweet about it