Download and run on a fresh install of macOS
curl -fsS https://gist.githubusercontent.com/molawson/8f6b40f5e96218c0a0880616c81bf41d/raw/setup.sh
sh setup.sh
echo "π¦ Start installing XCode | |
echo " press any key to continue" | |
read installing_xcode | |
echo "π οΈ Installing homebrew..." | |
curl -fsS 'https://raw.githubusercontent.com/Homebrew/install/master/install' | ruby | |
echo "π οΈ Installing initial apps for setup..." | |
brew tap "homebrew/bundle" | |
brew bundle --file=- <<EOF | |
tap "caskroom/cask" | |
cask "1password" | |
cask "alfred" | |
cask "dropbox" | |
cask "google-chrome" | |
EOF | |
echo "π¦ Start Dropbox selective sync (Apps, Documents/Fonts, Photos/Screenshots)" | |
echo " press any key to continue" | |
read syncing_dropbox | |
echo "π₯ Cloning and installing dotfiles..." | |
git clone https://github.com/molawson/dotfiles.git "$HOME/.dotfiles" | |
(cd "$HOME/.dotfiles"; rake install) | |
echo "π€ Running thoughtbot laptop script..." | |
curl -fsS 'https://raw.githubusercontent.com/thoughtbot/laptop/master/mac' | sh | |
echo "π οΈ Installing vim plugins..." | |
vim +PlugInstall +qall | |
echo "π οΈ Compiling ctrlp-cmatcher..." | |
(cd "$HOME/.vim/plugged/ctrlp-cmatcher"; CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments ./install.sh) | |
echo "π οΈ Installing the rest of the apps..." | |
brew bundle --file=- <<EOF | |
cask "backblaze" | |
cask "bartender" | |
cask "basecamp" | |
cask "carbon-copy-cloner" | |
cask "cloudapp" | |
cask "evernote" | |
cask "rowanj-gitx" | |
cask "iterm2" | |
cask "keybase" | |
cask "kindle" | |
cask "licecap" | |
cask "paw" | |
cask "propresenter" | |
cask "psequel" | |
cask "rocket" | |
cask "screenflow" | |
cask "screenhero" | |
cask "sequel-pro" | |
cask "slack" | |
cask "spotify" | |
cask "trailer" | |
cask "viscosity" | |
cask "zoomus" | |
EOF | |
echo "βοΈ Setting up user defaults..." | |
defaults write com.apple.screencapture location "$HOME/Dropbox/Photos/Screenshots" | |
killall SystemUIServer | |
echo "π Generating new SSH key..." | |
printf "What email do you want to use for your ssh key? " | |
read ssh_email | |
ssh-keygen -t rsa -b 4096 -C "$ssh_email" | |
echo "π¦ Make sure that the following is in your ~/.ssh/config file" | |
cat <<EOF | |
Host * | |
AddKeysToAgent yes | |
UseKeychain yes | |
IdentityFile ~/.ssh/id_rsa | |
EOF | |
echo " press any key to continue" | |
read editing_ssh_config | |
eval "$(ssh-agent -s)" | |
ssh-add -K "$HOME/.ssh/id_rsa" | |
echo "π Copying new key to clipboard..." | |
pbcopy < "$HOME/.ssh/id_rsa.pub" | |
echo "π¦ Add new key to GitHub" | |
open https://github.com/settings/keys | |
echo " press any key to continue" | |
read added_key_to_github | |
echo "π¦ Add new key to Keybase" | |
echo " press any key to continue" | |
read added_key_to_keybase | |
echo "π Generating new GPG key..." | |
gpg --gen-key | |
echo "GPG keys:" | |
gpg --list-secret-keys --keyid-format LONG | |
printf "π¦ What is the ID of the key you'd like to add to GitHub? " | |
read gpg_key_id | |
gpg --armor --export $gpg_key_id | |
echo "π¦ Add new GPG key to GitHub" | |
open https://github.com/settings/keys | |
echo " press any key to continue" | |
read added_gpg_to_github | |
echo "βοΈ Telling git about the new GPG key..." | |
git config --global user.signingkey $gpg_key_id | |
echo "βοΈ Updating dotfiles with ssh remote..." | |
(cd "$HOME/.dotfiles"; git remote set-url origin git@github.com:molawson/dotfiles.git) | |
echo "π Done!" |