1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/bash set -e os=$(uname -s | tr "[:upper:]" "[:lower:]") version="0.0.9" case $os in darwin | linux) url="https://github.com/juliosueiras/terraform-lsp/releases/download/v${version}/terraform-lsp_${version}_${os}_amd64.tar.gz" curl -L "$url" | tar zx ;; *) printf "%s doesn't supported" "$os" exit 1 ;; esac