Skip to content

Instantly share code, notes, and snippets.

@venkatesh87
Forked from samlester/mac-setup.sh
Created February 12, 2020 08:14
Show Gist options
  • Save venkatesh87/eb9d99c06d607b135f949d2810d09205 to your computer and use it in GitHub Desktop.
Save venkatesh87/eb9d99c06d607b135f949d2810d09205 to your computer and use it in GitHub Desktop.
Script to setup a new Mac
# Mac setup script
# By Sam Lester
# Based on https://gist.github.com/codeinthehole/26b37efa67041e1307db
# Usage:
# - Install Xcode Command Line Tools using "xcode-select --install"
# - Run "sh ./mac-setup.sh"
# - Run installers for apps that have them (Adobe Creative Cloud, Microsoft Office)
# - Install apps that aren't on cask (Todoist, Pocket, Magnet, Mactracker, iA Writer, Trello, Keynote)
#!/bin/sh
echo "Starting setup..."
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
brew update
echo "Installing packages..."
PACKAGES=(
composer
git
imagemagick
libjpeg
markdown
node@8
postgresql
vim
)
brew install ${PACKAGES[@]}
echo "Installing cask apps..."
brew tap homebrew/cask-versions
brew tap homebrew/cask-drivers
CASKS=(
adobe-creative-cloud
appcleaner
atom
brave-browser
craftmanager
discord
dropbox
epic-games
expressvpn
figma
firefox
firefox-developer-edition
gog-galaxy
google-chrome
google-chrome-canary
grandperspective
gyazo
handbrake
harvest
helium
hyper
iconjar
istat-menus
iterm2
logitech-options
mamp
microsoft-edge
microsoft-edge-beta
microsoft-office
minecraft
namechanger
notion
openemu
openrct2
openttd
opera
postgres
postman
safari-technology-preview
sequel-pro
sketch
slack
sony-ps4-remote-play
spotify
spotify-notifications
steam
sublime-text
transmit
ubiquiti-unifi-controller
visual-studio-code
vlc
whatsapp
)
brew cask install ${CASKS[@]}
echo "Installing fonts..."
brew tap homebrew/cask-fonts
FONTS=(
font-fontawesome
font-inter-ui
font-karla
font-lato
font-merriweather
font-montserrat
font-noto-sans
font-open-sans
font-roboto
font-roboto-condensed
font-roboto-mono
font-rubik
font-source-sans-pro
font-source-serif-pro
font-work-sans
)
brew cask install ${FONTS[@]}
echo "Cleaning up..."
brew cleanup
echo "Installing RVM and global gems..."
# Stop gems from installing documentation
echo "gem: --no-document" >> ~/.gemrc
curl -L https://get.rvm.io | bash -s stable --ruby
echo "Installing Ruby gems..."
RUBY_GEMS=(
bundler
)
sudo gem install ${RUBY_GEMS[@]}
echo "Installing global node packages..."
NODE_PACKAGES=(
create-react-app
foundation-cli
gatsby-cli
gulp-cli
@vue/cli
)
npm install -g ${NODE_PACKAGES[@]}
echo "Creating Developer folder..."
[[ ! -d Developer ]] && mkdir Developer
echo "Setup complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment