Skip to content

Instantly share code, notes, and snippets.

@Chrisedmo
Forked from codeinthehole/osx_bootstrap.sh
Last active November 14, 2017 23:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chrisedmo/402a18c9bcf8a9dd8bba816636646002 to your computer and use it in GitHub Desktop.
Save Chrisedmo/402a18c9bcf8a9dd8bba816636646002 to your computer and use it in GitHub Desktop.
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Notes:
#
# - If installing full Xcode, it's better to install that first from the app
# store before running the bootstrap script. Otherwise, Homebrew can't access
# the Xcode libraries as the agreement hasn't been accepted yet.
#
# Reading:
#
# - http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
# - https://gist.github.com/MatthewMueller/e22d9840f9ea2fee4716
# - https://news.ycombinator.com/item?id=8402079
# - http://notes.jerzygangi.com/the-best-pgp-tutorial-for-mac-os-x-ever/
#
# TO DO:
#
# Get Composer Working
# Get Valet Working
# Create / Update /.bash_profile
# Update homebrew recipes
brew update
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
PACKAGES=(
ack
autoconf
automake
gettext
git
imagemagick
jq
libjpeg
markdown
mas
mysql
mysql56
npm
php71
php71-mcrypt
php71-imagick
wget
yarn
)
echo "Installing packages..."
brew install ${PACKAGES[@]}
echo "Cleaning up..."
brew cleanup
echo "Installing cask..."
#brew tap caskroom/cask
CASKS=(
sketch
atom
alfred
flux
slack
paparazzi
transmit
imageoptim
imagealpha
iterm2
mailbutler
github
sourcetree
transmission
visual-studio-code
sequel-pro
)
echo "Installing cask apps..."
brew cask install ${CASKS[@]}
echo "Cask Apps Installed"
echo "Installing Mac App Store apps..."
MAS_APPS=(
409183694
1107421413
427515976
1278508951
682658836
407963104
411643860
442168834
439623248
409203825
557168941
409201541
498944723
404010395
413965349
449589707
803453959
)
mas install ${MAS_APPS[@]}
echo "Mac App Store Apps Installed"
echo "Installing Ruby gems"
RUBY_GEMS=(
bundler
filewatcher
bourbon
cocoapods
neat
sass
jekyll bundler
)
sudo gem install ${RUBY_GEMS[@]}
echo "Installing global npm packages..."
NPMS=(
critical
clean-css
cli
postcss
twig
)
npm install ${NPMS[@]} -g
# echo "Installing Composer"
# curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
# echo "Installing Valet"
# composer global require laravel/valet
echo "Bootstrapping complete"
@Chrisedmo
Copy link
Author

After setting up a new Mac, install XCode and then after it's installed, run:
xcode-select --install in the terminal.
Then chmod -x [this file]
Then run this .sh file in terminal and sit back, and relax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment