Set up automated updates for GitHub-sourced binaries

This commit is contained in:
Ohad Livne 2025-06-04 22:46:26 +03:00
parent 4810683763
commit 77a5e344ae
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D
7 changed files with 75 additions and 9 deletions

View file

@ -0,0 +1,12 @@
#! /usr/bin/sh
package=dolt
repo=dolthub/dolt
resource=dolt-linux-amd64.tar.gz
install_dolt() {
tar xz --directory="$(systemd-path user-binaries)" --strip-components=2 dolt-linux-amd64/bin/dolt
chmod 550 "$(systemd-path user-binaries)"/dolt
}
github_update "${package}" "${repo}" "${resource}" install_dolt

View file

@ -0,0 +1,14 @@
#! /usr/bin/sh
package=rust-analyzer
repo=rust-lang/rust-analyzer
resource=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}" "${resource}" install_rust_analyzer