Last active
May 2, 2017 20:48
-
-
Save Adron/40977c44527d518b5ad4bb9b42104553 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# THIS SHELL IS OUTDATED, PLEASE REFER TO https://gist.github.com/Adron/90863e51c8c5c0ad2049890bcd8abbfb FOR CURRENT INSTALLATION SCRIPT! | |
cd ~ | |
devopsToolsRoot="DevopsTools" | |
# Terraform Path & Info | |
hashiTerraform="terraform_0_6_16" | |
hashiTerraformUri="https://releases.hashicorp.com/terraform/0.6.16/" | |
hashiTerraformFile="terraform_0.6.16_darwin_amd64.zip" | |
# Packer Path & Info | |
hashiPacker="packer_0_10_1" | |
hashiPackerUri="https://releases.hashicorp.com/packer/0.10.1/" | |
hashiPackerFile="packer_0.10.1_darwin_amd64.zip" | |
# Create root. | |
mkdir $devopsToolsRoot | |
cd $devopsToolsRoot | |
#----------------------Terraform Download & Unzip ---------------------------# | |
# Create a move into directory. | |
mkdir $hashiTerraform | |
cd $hashiTerraform | |
# Download Terraform. URI: https://www.terraform.io/downloads.html | |
echo "Downloading and Unzipping $hashiTerraformUri$hashiTerraformFile." | |
curl -O "$hashiTerraformUri$hashiTerraformFile" | |
# Unzip, remove file, and source | |
unzip $hashiTerraformFile | |
rm -rf $hashiTerraformFile | |
#----------------------Packer Download & Unzip ------------------------------# | |
cd .. | |
# Create and move into directory. | |
mkdir $hashiPacker | |
cd $hashiPacker | |
# Download Packer. URI: https://www.packer.io/downloads.html | |
echo "Downloading and Unzipping $hashiPackerUri$hashiPackerFile." | |
curl -O "$hashiPackerUri$hashiPackerFile" | |
# Unzip and install | |
unzip $hashiPackerFile | |
rm -rf $hashiPackerFile | |
echo ' | |
# Terraform & Packer Paths. | |
export PATH=~/DevopsTools/packer_0_10_1:~/DevopsTools/terraform_0_6_16:$PATH | |
' >>~/.bash_profile | |
source ~/.bash_profile | |
terraform | |
packer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment