Last active
April 26, 2019 20:57
-
-
Save mattrasband/4ca37c7b03a7d02a3f7f5851a22c0eed to your computer and use it in GitHub Desktop.
Install Heroku CLI on Linux
This file contains hidden or 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 | |
############################################################################# | |
# Utility script to install (and update) embedded heroku from their tarball. | |
############################################################################# | |
set -eox pipefail | |
if [ -L /usr/local/bin/heroku ]; then | |
echo "Heroku symbolic link found, removing" | |
sudo rm /usr/local/bin/heroku | |
fi | |
if [ -d /opt/heroku ]; then | |
echo "Heroku directory already exists, trashing it." | |
sudo rm -rf /opt/heroku | |
fi | |
curl https://cli-assets.heroku.com/heroku-linux-x64.tar.gz | sudo tar zx -C /opt/ | |
sudo ln -s /opt/heroku/bin/heroku /usr/local/bin/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment