Skip to content

Instantly share code, notes, and snippets.

@christiannelson
Last active March 12, 2021 23:31
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 christiannelson/c2997a25048eea30728781c24f71a715 to your computer and use it in GitHub Desktop.
Save christiannelson/c2997a25048eea30728781c24f71a715 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "\nBootstrapping this machine...\n"
# Install HomeBrew
# HOMEBREW_PREFIX="/opt/homebrew"
if ! command -v brew >/dev/null; then
echo "- Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
export PATH="/opt/homebrew/bin:$PATH"
fi
brew update --force
echo "- Installing zsh, zsh-completions, and yadm"
brew install zsh zsh-completions yadm
# Switch to zsh
echo "- Changing your shell to zsh"
brew_zsh="/opt/homebrew/bin/zsh"
if ! grep "$brew_zsh" /etc/shells > /dev/null 2>&1 ; then
sudo sh -c "echo $brew_zsh >> /etc/shells"
fi
sudo chsh -s "$brew_zsh" "$USER"
# Install 1Password
brew install --cask 1password
# Next steps...
echo "\n1. yadm clone https://github.com/christiannelson/dotfiles.git"
echo "2. yadm bootstrap (or confirm as part of clone)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment