diff options
author | Thomas Faingnaert <thomas.faingnaert@hotmail.com> | 2019-12-28 22:30:35 +0100 |
---|---|---|
committer | Thomas Faingnaert <thomas.faingnaert@hotmail.com> | 2019-12-28 22:30:35 +0100 |
commit | d88dafc773e15c0e827f1877c62eed00526671a4 (patch) | |
tree | 0639a0ecf6f80d9d470073286dc01b6e0b2aecff /installer/install-clangd.sh | |
parent | 38c4e67140ee3e37c8c06765e111d00e2d1211dd (diff) | |
download | vim-lsp-settings-d88dafc773e15c0e827f1877c62eed00526671a4.tar.gz vim-lsp-settings-d88dafc773e15c0e827f1877c62eed00526671a4.tar.bz2 vim-lsp-settings-d88dafc773e15c0e827f1877c62eed00526671a4.zip |
Add installer for clangd (Linux)
Diffstat (limited to 'installer/install-clangd.sh')
-rwxr-xr-x | installer/install-clangd.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/installer/install-clangd.sh b/installer/install-clangd.sh new file mode 100755 index 0000000..0c47461 --- /dev/null +++ b/installer/install-clangd.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +set -e + +cd $(dirname $0) + +server_dir="../servers/clangd" +[ -d $server_dir ] && rm -rf $server_dir +mkdir $server_dir && cd $server_dir + +os=$(uname -s | tr "[:upper:]" "[:lower:]") + +case $os in + linux) + platform="pc-linux-gnu" + ;; + darwin) + platform="darwin-apple" + ;; +esac + +# Check Ubuntu version +ubuntu_version=$(lsb_release -a 2>&1 | grep 'Release' | awk '{print $2}') + +case $ubuntu_version in + 14.04|16.04|18.04) + platform="linux-gnu-ubuntu-$ubuntu_version" + ;; +esac + +filename="clang+llvm-9.0.0-x86_64-$platform" +url="http://releases.llvm.org/9.0.0/$filename.tar.xz" +echo "Downloading clangd and LLVM..." +curl -LO "$url" +echo "Extracting archive..." +tar xvf $filename.tar.xz --strip-components=2 $filename/bin/clangd +rm -fr clang+llvm-9.0.0* +./clangd --version |