diff --git a/README.md b/README.md index 7e96151e..08971cbc 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Installation for MacOS is the easiest with Homebrew. [If you do not have homebre brew install warrensbox/tap/tfswitch ``` -### Linux +### General Linux Installation for other linux operation systems. @@ -34,6 +34,13 @@ Installation for other linux operation systems. curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash ``` +### Snapcraft for CentOS, Ubuntu, Linux Mint, RHEL, Debian, Fedora + +```sh +sudo snap install tfswitch +``` + + ### Install from source Alternatively, you can install the binary from source [here](https://github.com/warrensbox/terraform-switcher/releases) @@ -160,9 +167,9 @@ cd(){ echo "Installing tfswitch locally" wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh chmod 755 install.sh -./install.sh -b bin-directory +./install.sh -b `pwd`/.bin -./bin-directory/tfswitch +`pwd`/.bin/tfswitch ``` If you have limited permission, try: @@ -171,15 +178,17 @@ If you have limited permission, try: #!/bin/bash echo "Installing tfswitch locally" -wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh -chmod 755 install.sh -./install.sh -b bin-directory +wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine + +chmod 755 install.sh #Make installer executable + +./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission + +CUSTOMBIN=`pwd`/.bin #set custom bin path -CUSTOMBIN=`pwd`/bin #set custom bin path -mkdir $CUSTOMBIN #create custom bin path export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment -./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7 +$CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7 terraform -v #testing version ``` @@ -210,15 +219,17 @@ jobs: echo "Installing tfswitch locally" - wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh - chmod 755 install.sh - ./install.sh -b bin-directory + wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine + + chmod 755 install.sh #Make installer executable + + ./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission + + CUSTOMBIN=`pwd`/.bin #set custom bin path - CUSTOMBIN=`pwd`/bin #set custom bin path - mkdir $CUSTOMBIN #create custom bin path export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment - ./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7 + $CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7 terraform -v #testing version ``` diff --git a/snapcraft.yaml b/snapcraft.yaml index 4e9bc78f..024ee486 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -8,7 +8,6 @@ description: | Once installed, simply select the version you require from the dropdown and start using terraform. architectures: - build-on: arm64 - - build-on: amd64 assumes: [snapd2.45] base: core18 diff --git a/www/docs/Continuous-Integration.md b/www/docs/Continuous-Integration.md index cf9b4012..62a4939e 100644 --- a/www/docs/Continuous-Integration.md +++ b/www/docs/Continuous-Integration.md @@ -5,27 +5,17 @@ #!/bin/bash echo "Installing tfswitch locally" -wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh -chmod 755 install.sh -./install.sh -b bin-directory +wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine -./bin-directory/tfswitch -``` -If you have limited permission, try: +chmod 755 install.sh #Make installer executable -```sh -#!/bin/bash +./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission -echo "Installing tfswitch locally" -wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh -chmod 755 install.sh -./install.sh -b bin-directory +CUSTOMBIN=`pwd`/.bin #set custom bin path -CUSTOMBIN=`pwd`/bin #set custom bin path -mkdir $CUSTOMBIN #create custom bin path export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment -./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7 +$CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7 terraform -v #testing version ``` @@ -56,15 +46,17 @@ jobs: echo "Installing tfswitch locally" - wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh - chmod 755 install.sh - ./install.sh -b bin-directory + wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine + + chmod 755 install.sh #Make installer executable + + ./install.sh -b `pwd`/.bin #Install tfswitch in a location you have permission + + CUSTOMBIN=`pwd`/.bin #set custom bin path - CUSTOMBIN=`pwd`/bin #set custom bin path - mkdir $CUSTOMBIN #create custom bin path export PATH=$PATH:$CUSTOMBIN #Add custom bin path to PATH environment - ./bin-directory/tfswitch -b $CUSTOMBIN/terraform 0.11.7 + $CUSTOMBIN/tfswitch -b $CUSTOMBIN/terraform 0.11.7 #or simply tfswitch -b $CUSTOMBIN/terraform 0.11.7 terraform -v #testing version ``` \ No newline at end of file diff --git a/www/docs/Troubleshoot.md b/www/docs/Troubleshoot.md index 09b75378..1841ae38 100644 --- a/www/docs/Troubleshoot.md +++ b/www/docs/Troubleshoot.md @@ -21,14 +21,35 @@ Solution: You probably need to have privileges to install *tfswitch* at /usr/loc Try the following: ```sh -wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh -chmod 755 install.sh -./install.sh -b bin-directory +wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh #Get the installer on to your machine: + +chmod 755 install.sh #Make installer executable + +./install.sh -b $HOME/.bin #Install tfswitch in a location you have permission: + +$HOME/.bin/tfswitch #test + +export PATH=$PATH:$HOME/.bin #Export your .bin into your path + +#You should probably add step 4 in your `.bash_profile` in your $HOME directory. + +#Next, try: +`tfswitch -b $HOME/.bin/terraform 0.11.7` + +#or simply + +`tfswitch -b $HOME/.bin/terraform` + -./bin-directory/tfswitch ``` -Or, use the custom directory option `-b`: +See the custom directory option `-b`: drawing +```sh +wget https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh +chmod 755 install.sh +./install.sh -b $HOME/.bin +$HOME/.bin/tfswitch +```