aboutsummaryrefslogtreecommitdiff
path: root/installer/install-omnisharp-lsp.sh
blob: 52612930c1b274cd4f080853897a7545ea3d178e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash

set -e

os=$(uname -s | tr "[:upper:]" "[:lower:]")
arch="-x64"

case $os in
linux) ;;
darwin)
  os="osx"
  arch=""
  ;;
*)
  printf "%s doesn't supported by bash installer" "$os"
  exit 1
  ;;
esac

version="v1.34.9"
url="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$os$arch.tar.gz"
curl -LO "$url"
tar xzvf omnisharp-$os$arch.tar.gz
rm omnisharp-$os$arch.tar.gz

chmod +x run

cat <<EOF > omnisharp-lsp
#!/usr/bin/env bash

DIR=\$(cd \$(dirname \$0); pwd)
\$DIR/run \$*
EOF

chmod +x omnisharp-lsp