my dotz
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Auto push remotes & symlink chtf

+3 -40
+2
.config/git/config
··· 38 38 email = j3s@c3f.net 39 39 [pull] 40 40 ff = only 41 + [push] 42 + autoSetupRemote = true 41 43 [pager] 42 44 status = true 43 45 [init]
+1 -40
bin/chtf
··· 1 - #!/bin/sh 2 - # 3 - # list installed tf versions + 4 - # switch terraform versions + 5 - # + download tf if not found 6 - 7 - tf_version="$1" 8 - tf_install_dir="${HOME}/.local/share/chtf" 9 - tf_link_name="${HOME}/bin/terraform" 10 - 11 - # make some os assumptions 12 - if [ "$(uname)" = "Linux" ]; then 13 - os="linux" 14 - else 15 - os="darwin" 16 - fi 17 - 18 - mkdir -p "$tf_install_dir" 19 - 20 - if [ -z "$tf_version" ]; then 21 - # if no arguments, list versions of tf plus list symlink pointer. 22 - printf "available:\n" 23 - ls "$tf_install_dir" 24 - printf "active:\n" 25 - if [ -e "$tf_link_name" ]; then 26 - readlink "$tf_link_name" | xargs basename 27 - fi 28 - else 29 - if [ ! -f "${tf_install_dir}/${tf_version}" ]; then 30 - # download tf version if not found 31 - printf "terraform version not found. downloading...\n" 32 - dl="https://releases.hashicorp.com/terraform/${tf_version}/terraform_${tf_version}_${os}_amd64.zip" 33 - printf "downloading %s\n" "$dl" 34 - curl -L --output /tmp/tf.zip "$dl" 35 - unzip /tmp/tf.zip -d /tmp 36 - mv /tmp/terraform "${tf_install_dir}/${tf_version}" 37 - rm /tmp/tf.zip 38 - fi 39 - ln -sf "${tf_install_dir}/${tf_version}" "$tf_link_name" 40 - fi 1 + /home/j3s/code/chtf/chtf