Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 53 additions & 103 deletions installer/install-clangd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

version="22.1.6"

# On MacOS, use clangd in Command Line Tools for Xcode.
if command -v xcrun 2>/dev/null && xcrun --find clangd 2>/dev/null; then
cat <<'EOF' >clangd
Expand All @@ -13,120 +15,68 @@ EOF
exit
fi

if command -v lsb_release 2>/dev/null; then
distributor_id=$(lsb_release -a 2>&1 | grep 'Distributor ID' | awk '{print $3}')
elif [ -e /etc/fedora-release ]; then
distributor_id="Fedora"
elif [ -e /etc/redhat-release ]; then
distributor_id=$(cut -d ' ' -f 1 /etc/redhat-release)
elif [ -e /etc/arch-release ]; then
distributor_id="Arch"
elif [ -e /etc/SuSE-release ]; then
distributor_id="SUSE"
elif [ -e /etc/mandriva-release ]; then
distributor_id="Mandriva"
elif [ -e /etc/vine-release ]; then
distributor_id="Vine"
elif [ -e /etc/gentoo-release ]; then
distributor_id="Gentoo"
else
distributor_id="Unknown"
fi

filename() {
distributor_id=$1
version=$2

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

case $os in
linux)
platform="pc-linux-gnu"
;;
darwin)
platform="apple-darwin"
;;
esac

case $distributor_id in
# Check Ubuntu version
Ubuntu)
ubuntu_version=$(lsb_release -a 2>&1 | grep 'Release' | awk '{print $2}')
case $ubuntu_version in
14.04 | 16.04 | 18.04 | 20.04)
platform="linux-gnu-ubuntu-$ubuntu_version"
;;
22.04)
platform="linux-gnu-ubuntu-20.04"
;;
esac
;;
# Check LinuxMint version
LinuxMint)
linuxmint_version=$(lsb_release -a 2>&1 | grep 'Release' | awk '{print $2}')
case $linuxmint_version in
19 | 19.1 | 19.2 | 19.3)
platform="linux-gnu-ubuntu-18.04"
;;
18 | 18.1 | 18.2 | 18.3)
platform="linux-gnu-ubuntu-16.04"
;;
esac
;;
# Check RedHat OS version
Fedora | Oracle | CentOS)
case $version in
9.0.0 | 10.0.0)
platform="linux-sles11.3"
;;
11.0.0)
platform="linux-sles12.4"
;;
esac
;;
esac

# Check Architecture
arch=$(uname -m)
case $arch in
aarch64)
platform="linux-gnu"
;;
esac

echo "clang+llvm-$version-$arch-$platform"
}

# Search for local clangd in PATH
if which "clangd" >/dev/null; then
clangd --version
exit 0
clangd --version
exit 0
fi
for llvm_version in $(seq 30 -1 9); do
cmd="clangd-$llvm_version"
if which "$cmd" >/dev/null; then
echo "Found $(which $cmd)"
echo "Found $(which "$cmd")"
ln -sf "$(which "$cmd")" clangd
./clangd --version
exit 0
fi
done

# Search for an installable clang+llvm release.
for llvm_version in 15 14 13 12 11 10 9; do
filename="$(filename "$distributor_id" "$llvm_version.0.0")"
url="https://github.com/llvm/llvm-project/releases/download/llvmorg-$llvm_version.0.0/$filename.tar.xz"
response_code=$(curl -sIL "${url}" -o /dev/null -w "%{response_code}")
# Otherwise download a prebuilt release from the LLVM project.
# Asset naming reference:
# https://github.com/llvm/llvm-project/releases
os=$(uname -s | tr "[:upper:]" "[:lower:]")
arch=$(uname -m)
ext="tar.xz"

# If version exists, install it and exit.
if [ "${response_code}" -ne "404" ]; then
echo "Downloading clangd and LLVM $llvm_version..."
curl -L "$url" | unxz | tar x --strip-components=1 "$filename"/
ln -sf bin/clangd .
./clangd --version
exit 0
fi
done
case $os in
linux)
case $arch in
x86_64)
filename="LLVM-$version-Linux-X64"
;;
aarch64 | arm64)
filename="LLVM-$version-Linux-ARM64"
;;
armv7l)
filename="clang+llvm-$version-armv7a-linux-gnueabihf"
ext="tar.gz"
;;
*)
echo "unsupported architecture: $arch"
exit 1
;;
esac
;;
darwin)
case $arch in
arm64 | aarch64)
filename="LLVM-$version-macOS-ARM64"
;;
*)
echo "unsupported architecture: $arch"
exit 1
;;
esac
;;
*)
echo "unsupported OS: $os"
exit 1
;;
esac

echo "Could not find an installable clangd release!"
exit 1
url="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/$filename.$ext"
echo "Downloading clangd and LLVM $version..."
curl -L -o "clangd.$ext" "$url"
tar -xf "clangd.$ext" --strip-components=1 "$filename"
rm -f "clangd.$ext"
ln -sf bin/clangd .
./clangd --version
3 changes: 2 additions & 1 deletion installer/install-deno.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@echo off

setlocal
curl -L -o deno-x86_64-pc-windows-msvc.zip "https://github.com/denoland/deno/releases/latest/download/deno-x86_64-pc-windows-msvc.zip"
set VERSION=v2.7.14
curl -L -o deno-x86_64-pc-windows-msvc.zip "https://github.com/denoland/deno/releases/download/%VERSION%/deno-x86_64-pc-windows-msvc.zip"
call "%~dp0\run_unzip.cmd" deno-x86_64-pc-windows-msvc.zip
del deno-x86_64-pc-windows-msvc.zip
4 changes: 3 additions & 1 deletion installer/install-deno.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

version="v2.7.14"

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

case $os in
Expand All @@ -17,5 +19,5 @@ darwin)
;;
esac

curl -L -o "deno-$os.zip" "https://github.com/denoland/deno/releases/latest/download/$filename"
curl -L -o "deno-$os.zip" "https://github.com/denoland/deno/releases/download/$version/$filename"
unzip "deno-$os.zip"
3 changes: 2 additions & 1 deletion installer/install-helm-ls.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@echo off

setlocal
set VERSION=v0.5.4
echo Downloading helm-ls...
curl -L -o helm-ls.exe "https://github.com/mrjosh/helm-ls/releases/latest/download/helm_ls_windows_amd64.exe"
curl -L -o helm-ls.exe "https://github.com/mrjosh/helm-ls/releases/download/%VERSION%/helm_ls_windows_amd64.exe"
4 changes: 3 additions & 1 deletion installer/install-helm-ls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

version="v0.5.4"

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

case $os in
Expand All @@ -21,5 +23,5 @@ darwin)
;;
esac

curl -L -o helm-ls "https://github.com/mrjosh/helm-ls/releases/latest/download/$filename"
curl -L -o helm-ls "https://github.com/mrjosh/helm-ls/releases/download/$version/$filename"
chmod 755 helm-ls
3 changes: 2 additions & 1 deletion installer/install-kakehashi.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@echo off

setlocal
curl -L -o "kakehashi-windows.zip" "https://github.com/atusy/kakehashi/releases/latest/download/kakehashi-v0.5.0-x86_64-pc-windows-msvc.zip"
set VERSION=v0.5.0
curl -L -o "kakehashi-windows.zip" "https://github.com/atusy/kakehashi/releases/download/%VERSION%/kakehashi-%VERSION%-x86_64-pc-windows-msvc.zip"
call "%~dp0\run_unzip.cmd" kakehashi-windows.zip
del kakehashi-windows.zip
5 changes: 3 additions & 2 deletions installer/install-kakehashi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

version="v0.5.0"

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

Expand Down Expand Up @@ -32,8 +34,7 @@ darwin)
;;
esac

# Download latest release
url="https://github.com/atusy/kakehashi/releases/latest/download/kakehashi-v0.5.0-${platform}.tar.gz"
url="https://github.com/atusy/kakehashi/releases/download/${version}/kakehashi-${version}-${platform}.tar.gz"
curl -L -o "kakehashi-${platform}.tar.gz" "$url"
tar xzf "kakehashi-${platform}.tar.gz"
rm "kakehashi-${platform}.tar.gz"
Expand Down
3 changes: 2 additions & 1 deletion installer/install-kotlin-language-server.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@echo off

setlocal
curl -L -o server.zip "https://github.com/fwcd/kotlin-language-server/releases/latest/download/server.zip"
set VERSION=1.3.13
curl -L -o server.zip "https://github.com/fwcd/kotlin-language-server/releases/download/%VERSION%/server.zip"
call "%~dp0\run_unzip.cmd" server.zip
del server.zip

Expand Down
4 changes: 3 additions & 1 deletion installer/install-kotlin-language-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

set -e

curl -L -o server.zip "https://github.com/fwcd/kotlin-language-server/releases/latest/download/server.zip"
version="1.3.13"

curl -L -o server.zip "https://github.com/fwcd/kotlin-language-server/releases/download/$version/server.zip"
unzip server.zip
rm server.zip

Expand Down
3 changes: 2 additions & 1 deletion installer/install-markdown-oxide.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@echo off

setlocal
curl -L -o "markdown-oxide-windows.zip" "https://github.com/atusy/markdown-oxide/releases/latest/download/markdown-oxide-v0.25.10-x86_64-pc-windows-gnu.zip"
set VERSION=v0.25.10
curl -L -o "markdown-oxide-windows.zip" "https://github.com/Feel-ix-343/markdown-oxide/releases/download/%VERSION%/markdown-oxide-%VERSION%-x86_64-pc-windows-gnu.zip"
call "%~dp0\run_unzip.cmd" markdown-oxide-windows.zip
del markdown-oxide-windows.zip
9 changes: 5 additions & 4 deletions installer/install-markdown-oxide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

version="v0.25.10"

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

Expand Down Expand Up @@ -32,10 +34,9 @@ darwin)
;;
esac

# Download latest release
url="https://github.com/Feel-ix-343/markdown-oxide/releases/latest/download/markdown-oxide-v0.25.10-${platform}.tar.gz"
url="https://github.com/Feel-ix-343/markdown-oxide/releases/download/${version}/markdown-oxide-${version}-${platform}.tar.gz"
curl -L -o "markdown-oxide-${platform}.tar.gz" "$url"
tar xzf "markdown-oxide-${platform}.tar.gz"
mv markdown-oxide-v0.25.10-${platform}/markdown-oxide markdown-oxide
rm "markdown-oxide-${platform}.tar.gz"
mv "markdown-oxide-${version}-${platform}/markdown-oxide" markdown-oxide
rm -rf "markdown-oxide-${version}-${platform}" "markdown-oxide-${platform}.tar.gz"
chmod +x markdown-oxide
4 changes: 3 additions & 1 deletion installer/install-marksman.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@echo off

curl -L -o marksman.exe "https://github.com/artempyanykh/marksman/releases/latest/download/marksman.exe"
setlocal
set VERSION=2026-02-08
curl -L -o marksman.exe "https://github.com/artempyanykh/marksman/releases/download/%VERSION%/marksman.exe"
6 changes: 4 additions & 2 deletions installer/install-marksman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

set -e

version="2026-02-08"

os=$(uname -s | tr "[:upper:]" "[:lower:]")
if [ $(uname -m) = "x86_64" ];
if [ "$(uname -m)" = "x86_64" ];
then
arch="x64"
else
Expand All @@ -18,5 +20,5 @@ darwin)
;;
esac

curl -L -o marksman "https://github.com/artempyanykh/marksman/releases/latest/download/marksman-$platform"
curl -L -o marksman "https://github.com/artempyanykh/marksman/releases/download/$version/marksman-$platform"
chmod +x marksman
3 changes: 2 additions & 1 deletion installer/install-ntt.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@echo off

setlocal
curl -LO "https://github.com/nokia/ntt/releases/latest/download/ntt_windows_x86_64.zip"
set VERSION=v0.23.2
curl -LO "https://github.com/nokia/ntt/releases/download/%VERSION%/ntt_windows_x86_64.zip"
unzip ntt_windows_x86_64.zip
rm ntt_windows_x86_64.zip
4 changes: 3 additions & 1 deletion installer/install-ntt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
set -e
#set -o pipefail

version="v0.23.2"

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

case "${os}" in
darwin | linux)
url="https://github.com/nokia/ntt/releases/latest/download/ntt_${os}_x86_64.tar.gz"
url="https://github.com/nokia/ntt/releases/download/${version}/ntt_${os}_x86_64.tar.gz"
curl -L "$url" | tar xz ntt
chmod +x ntt
;;
Expand Down
10 changes: 6 additions & 4 deletions installer/install-omnisharp-lsp.cmd
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
@echo off
setlocal

for /f "delims=" %%i in ('dotnet --version') do set version=%%i
set VERSION=v1.39.15

for /f "delims=" %%i in ('dotnet --version') do set dotnet_version=%%i

set mainVersion=%version:.=&rem %

set mainVersion=%dotnet_version:.=&rem %

if /i "%mainVersion%" geq "6" (
curl -L -o omnisharp.zip "https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-win-x64-net6.0.zip"
curl -L -o omnisharp.zip "https://github.com/OmniSharp/omnisharp-roslyn/releases/download/%VERSION%/omnisharp-win-x64-net6.0.zip"
) else (
curl -L -o omnisharp.zip "https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-win-x64.zip"
curl -L -o omnisharp.zip "https://github.com/OmniSharp/omnisharp-roslyn/releases/download/%VERSION%/omnisharp-win-x64.zip"
)

call "%~dp0\run_unzip.cmd" omnisharp.zip
Expand Down
Loading