Skip to content

Instantly share code, notes, and snippets.

@autodidacticon
Last active January 6, 2022 07:22
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 autodidacticon/b2c02521cdd8a70a8479b2a33c78c92b to your computer and use it in GitHub Desktop.
Save autodidacticon/b2c02521cdd8a70a8479b2a33c78c92b to your computer and use it in GitHub Desktop.
mac.sh
#!/bin/bash
# macos provisioning script
# prerequisites: hostname folder must exist as host-$HOSTNAME
# usage: mac.sh hostname
HOSTNAME=$1
sudo hostname $HOSTNAME
scutil --set HostName $HOSTNAME
cd ~
mkdir git
cd git
#install Xcode CLT
xcode-select --install
# install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# clone dotfiles
git clone https://github.com/autodidacticon/dotfiles.git
# install 'brew bundle'
brew update
brew tap homebrew/bundle
# install stuff
cd ~/git/dotfiles/host-`hostname`
brew bundle -v
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# install dotfiles
rcup -d $HOME/git/dotfiles -B `hostname -s` -x Brewfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment