Support dynamic resource selection

This commit is contained in:
Ohad Livne 2026-01-29 23:15:28 +02:00
parent 4cc2af055d
commit 0e61f5f32f
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D
6 changed files with 29 additions and 11 deletions

View file

@ -5,7 +5,10 @@ IFS=$'\n\t'
package=rust-analyzer
repo=rust-lang/rust-analyzer
resource=rust-analyzer-x86_64-unknown-linux-gnu.gz
rust_analyzer_resource() {
echo "rust-analyzer-x86_64-unknown-linux-gnu.gz"
}
install_rust_analyzer() {
tempfile="$(mktemp)"
@ -14,4 +17,4 @@ install_rust_analyzer() {
mv "${tempfile}" "$(systemd-path user-binaries)"/rust-analyzer
}
github_update "${package}" "${repo}" "${resource}" install_rust_analyzer
github_update "${package}" "${repo}" rust_analyzer_resource install_rust_analyzer