Last active
June 1, 2023 16:51
-
-
Save kreeger/8e16b3ef10412941776efdf70439056e to your computer and use it in GitHub Desktop.
A script for bootstrapping a new Mac.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# bootstrap-macOS.sh | |
# Install Xcode, make sure Mackup's files are downloaded, and then run this script. | |
# | |
# Install Xcode command line tools. | |
sudo xcode-select --install | |
# Install homebrew. | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
# Gotta do this to avoid some warnings about untrusted compinit scripts | |
sudo chown -R bkreeger /usr/local/share/zsh | |
sudo chmod -R 755 /usr/local/share/zsh | |
# Clone my Neovim config. | |
mkdir -p $HOME/.config | |
git clone https://github.com/kreeger/nvimrc.git $HOME/.config/nvim | |
cd $HOME/.config/nvim && git remote set-url origin [email protected]:kreeger/nvimrc.git | |
# Don't forget to open up Neovim and run `:PlugInstall`! | |
# Install a handful of homebrew packages. | |
brew install cloc imagemagick mosh neovim pinentry-mac postgresql sqlite stern swiftlint wget zlib | |
brew tap homebrew/cask homebrew/services | |
brew install --cask 1password android-studio bartender coconutbattery daisydisk discord docker fluid \ | |
freac gitify google-cloud-sdk gpg-suite-no-mail istat-menus iterm2 oracle-jdk \ | |
rapidapi raycast reveal slack visual-studio-code vivaldi | |
# Clone asdf-vm and install some plugins. | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.3 | |
source $HOME/.asdf/asdf.sh | |
asdf plugin add ruby | |
asdf plugin add python | |
asdf plugin add nodejs | |
# Then use that to install some interpreters. | |
asdf install ruby 3.1.2 | |
asdf global ruby 3.1.2 | |
asdf install python 3.11.3 | |
asdf global python 3.11.3 | |
asdf install nodejs 18.16.0 | |
asdf global nodejs 18.16.0 | |
# Install mackup via python. | |
pip install --upgrade mackup | |
asdf reshim python | |
# And some global Node packages | |
npm install -g brighterscript typescript dredd | |
asdf reshim nodejs | |
# Finally, generate a new SSH key and copy it. | |
ssh-keygen -f $HOME/.ssh/id_rsa -N "" -q | |
cat $HOME/.ssh/id_rsa.pub | pbcopy | |
# Invoke Mackup. | |
mackup restore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment