Skip to content

Instantly share code, notes, and snippets.

@itruls
Last active September 16, 2018 11:55
Show Gist options
  • Save itruls/cf7e653c2e2b33db874866fa96bc3e1b to your computer and use it in GitHub Desktop.
Save itruls/cf7e653c2e2b33db874866fa96bc3e1b to your computer and use it in GitHub Desktop.
Setup new Mac with Homebrew and Anaconda
#!/bin/bash
TEMP="/tmp"
ANACONDA_REPO="https://repo.continuum.io/archive"
# TODO: Update with latest installer. Updated 2018-05-30.
ANACONDA_BIN="Anaconda3-5.2.0-MacOSX-x86_64.sh"
APPLEID="email@email.com"
#TODO: First check if Command Line Tools are already installed:
# if $(xcode-select -p) == "/Applications/Xcode.app/Contents/Developer" then echo "CLT already installed"
echo "Installing Command Line Tools for Xcode ..."
xcode-select --install
echo "Install Homebrew from https://brew.sh ..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing Mac App Store Command line interface"
brew install mas
mas signin $APPLEID
echo "Downloading Anaconda to $TEMP"
# TODO: Find latest Anaconda version in ANACONDA_REPO
# More information at https://www.digitalocean.com/community/tutorials/how-to-install-the-anaconda-python-distribution-on-ubuntu-16-04
cd $TEMP
curl -O ${ANACONDA_REPO}/${ANACONDA_BIN}
bash ${ANACONDA_BIN}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment