-
-
Save mario21ic/cc8b9cbbcbc9efc81f6f604dd7eedb7b to your computer and use it in GitHub Desktop.
Install hashicorp tools in an easy way (terraform, packer, ...)
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
#!/bin/sh | |
TOOL_NAME=$1 | |
ZIP_URL=$2 | |
mkdir /tmp/$TOOL_NAME | |
cd /tmp/$TOOL_NAME | |
curl -sS $ZIP_URL > $TOOL_NAME.zip | |
unzip $TOOL_NAME.zip | |
sudo cp $TOOL_NAME /usr/local/bin/$TOOL_NAME | |
rm -rf /tmp/$TOOL_NAME | |
echo "$TOOL_NAME :: is installed successfully" |
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
# sample installing terraform | |
$ chmod +x /hashicorp.sh | |
$ ./hashicorp.sh terraform https://releases.hashicorp.com/terraform/0.9.2/terraform_0.9.2_linux_amd64.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment