dotfiles/.local/share/github-versions/rust-analyzer

20 lines
456 B
Bash
Executable file

#! /usr/bin/bash
set -euo pipefail
IFS=$'\n\t'
package=rust-analyzer
repo=rust-lang/rust-analyzer
rust_analyzer_resource() {
echo "rust-analyzer-x86_64-unknown-linux-gnu.gz"
}
install_rust_analyzer() {
tempfile="$(mktemp)"
gunzip --to-stdout - > "${tempfile}"
chmod 550 "${tempfile}"
mv "${tempfile}" "$(systemd-path user-binaries)"/rust-analyzer
}
github_update "${package}" "${repo}" rust_analyzer_resource install_rust_analyzer