aboutsummaryrefslogtreecommitdiff
path: root/installer/install-terraform-lsp.sh
blob: 8d248cec3796f15080376f5540dc257395353fcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

set -e

os=$(uname -s | tr "[:upper:]" "[:lower:]")
version="0.0.9"
server_dir="../servers/terraform-lsp"

cd $(dirname $0)
[ -d $server_dir ] && rm -rf $server_dir
mkdir $server_dir && cd $server_dir

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