Skip to content

Instantly share code, notes, and snippets.

@jessbudd
Last active April 9, 2024 08:01
Show Gist options
  • Select an option

  • Save jessbudd/c343038ef05ca2a5e12a34ffa0aec471 to your computer and use it in GitHub Desktop.

Select an option

Save jessbudd/c343038ef05ca2a5e12a34ffa0aec471 to your computer and use it in GitHub Desktop.
New PC setup bash script
Homebrew
install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#!/usr/bin/env bash
# Setup script for setting up a new macos machineecho "Starting setup"# install xcode CLI
xcode-select —-install
# Check for Homebrew to be present, install if it's missing
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes if already installed
brew update
PACKAGES=(
node
fnm
git
<...list all the packages you want to install>
readline
)echo "Installing packages..."
brew install ${PACKAGES[@]} link readline
brew link --force readline
echo "Installing cask..."CASKS=(
adobe-acrobat-reader
slack
visual-studio-code
firefox
google-chrome
)echo "Installing cask apps..."
brew cask install ${CASKS[@]}
# Enable tap-to-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
echo "Macbook setup completed!"
Src: https://medium.com/macoclock/automating-your-macos-setup-with-homebrew-and-cask-e2a103b51af1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment