17 lines
447 B
Bash
Executable File
17 lines
447 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -ex
|
|
|
|
REPO="https://github.com/rust-analyzer/rust-analyzer"
|
|
VERSION="2022-04-04"
|
|
DLURL="$REPO/releases/download/$VERSION/rust-analyzer-x86_64-unknown-linux-gnu.gz"
|
|
GZFILE="$HOME/.cache/rust-analyzer-$VERSION-x86_64-unknown-linux-gnu.gz"
|
|
BINDIR="$HOME/.local/bin"
|
|
|
|
test -f "$GZFILE" ||
|
|
wget -O "$GZFILE" "$DLURL"
|
|
|
|
rm -f "$BINDIR/rust-analyzer"
|
|
gunzip "$GZFILE" --stdout > "$BINDIR/rust-analyzer"
|
|
chmod u+x "$BINDIR/rust-analyzer"
|