Skip to content

Instantly share code, notes, and snippets.

@Ralnoc
Last active July 10, 2020 13:50
Show Gist options
  • Save Ralnoc/2e8c65c16b4b7186332cc184c3f7b5e3 to your computer and use it in GitHub Desktop.
Save Ralnoc/2e8c65c16b4b7186332cc184c3f7b5e3 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ ! -f /usr/local/bin/brew ]]
then
echo "Missing Homebrew. Will now install so that pyenv installation can continue..."
read -p "Press CTRL-C to cancel or Enter to continue..."
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
fi
echo "Installing pyenv..."
brew update
brew install pyenv
echo "Injecting initialization commands to ~/.bashrc"
echo 'export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
echo "Installation Complete."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment