This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/_install-rust-analyzer

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"