Skip to content

Commit

Permalink
dump tfenv, use tfswitch. install starship and antibody in $home_bin
Browse files Browse the repository at this point in the history
tfswitch needs my patch warrensbox/terraform-switcher#121
  • Loading branch information
grimm26 committed Dec 14, 2020
1 parent dca87e2 commit f58df5b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
11 changes: 7 additions & 4 deletions zsh/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ alias kit=kitchen
alias tf=terraform
alias tg=terragrunt
alias tglog="TF_LOG=TRACE TF_LOG_PATH=./tflog.out terragrunt"
path+=(~/.tfenv/bin)
tf11 () {
ln -fs ~/bin/terragrunt_18 ~/bin/terragrunt
tfenv use 'latest:^0.11'
tfswitch 0.11.14
}
tf12 () {
ln -fs ~/bin/terragrunt_latest ~/bin/terragrunt
tfenv use 'latest:^0.12'
tfswitch 0.12.29
}
tf13 () {
ln -fs ~/bin/terragrunt_latest ~/bin/terragrunt
tfenv use 'latest:^0.13'
tfswitch 0.13.5
}
tf14 () {
ln -fs ~/bin/terragrunt_latest ~/bin/terragrunt
tfswitch 0.14.2
}
alias tgi="terragrunt init -upgrade -reconfigure"
alias tgu="terragrunt 0.12upgrade -yes;chompeof *.tf;uniq main.tf > main.tfu;mv main.tfu main.tf;sed -i tmp '/^\s*$/d' versions.tf;rm versions.tftmp"
Expand Down
26 changes: 8 additions & 18 deletions zsh/setup_shell_stuff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ case $(uname) in
git clone https://github.com/eth-p/bat-extras.git && \
cd bat-extras && \
./build.sh --no-verify && \
cp bin/* ~/.local/bin
cp bin/* $home_bin
cd /tmp
echo "kubectl"
KUBECTL_STABLE=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
MY_KUBECTL_VERSION=$(kubectl version --client --short 2>/dev/null | awk '{print $3}')
if [[ $KUBECTL_STABLE != $MY_KUBECTL_VERSION ]]; then
curl -L https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o ~/.local/bin/kubectl && \
chmod 755 ~/.local/bin/kubectl
curl -L https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o ${home_bin}/kubectl && \
chmod 755 ${home_bin}/kubectl
fi
;;
Darwin)
Expand Down Expand Up @@ -178,18 +178,9 @@ case $(uname) in
;;
esac

# tfenv
echo "tfenv"
if [[ -d ~/.tfenv ]];then
cd ~/.tfenv
git pull --no-rebase
cd -
else
git clone https://github.com/tfutils/tfenv.git ~/.tfenv
fi
~/.tfenv/bin/tfenv install 0.11.14
~/.tfenv/bin/tfenv install 'latest:^0.12'
~/.tfenv/bin/tfenv install 'latest:^0.13'
# tfswitch
echo "tfswitch"
curl -L https://github.com/raw/warrensbox/terraform-switcher/release/install.sh | bash -s - -b ${home_bin}

# k9s
echo "k9s"
Expand All @@ -209,10 +200,9 @@ chmod 755 ~/bin/cheat

# antibody
echo "antibody"
curl -sfL git.io/antibody | sudo sh -s - -b /usr/local/bin
curl -sfL git.io/antibody | bash -s - -b ${home_bin}
# starship (prompt)
curl -fsSL https://starship.rs/install.sh | sudo bash -s - -y
sudo chown root: /usr/local/bin/starship
curl -fsSL https://starship.rs/install.sh | bash -s - -y -b ${home_bin}

cd $SCRIPT_HOME
for z in .z* .config/*;do
Expand Down

0 comments on commit f58df5b

Please sign in to comment.