Support dynamic resource selection
This commit is contained in:
parent
c16e517a9c
commit
040f83561c
6 changed files with 29 additions and 11 deletions
|
|
@ -5,11 +5,14 @@ IFS=$'\n\t'
|
|||
|
||||
package=dolt
|
||||
repo=dolthub/dolt
|
||||
resource=dolt-linux-amd64.tar.gz
|
||||
|
||||
dolt_resource() {
|
||||
echo "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
|
||||
github_update "${package}" "${repo}" dolt_resource install_dolt
|
||||
|
|
|
|||
|
|
@ -5,11 +5,14 @@ IFS=$'\n\t'
|
|||
|
||||
package=kingfisher
|
||||
repo=mongodb/kingfisher
|
||||
resource=kingfisher-linux-x64.tgz
|
||||
|
||||
kingfisher_resource() {
|
||||
echo "kingfisher-linux-x64.tgz"
|
||||
}
|
||||
|
||||
install_kingfisher() {
|
||||
tar xz --directory="$(systemd-path user-binaries)" kingfisher
|
||||
chmod 550 "$(systemd-path user-binaries)"/kingfisher
|
||||
}
|
||||
|
||||
github_update "${package}" "${repo}" "${resource}" install_kingfisher
|
||||
github_update "${package}" "${repo}" kingfisher_resource install_kingfisher
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ IFS=$'\n\t'
|
|||
|
||||
package=minikube
|
||||
repo=kubernetes/minikube
|
||||
resource=minikube-linux-amd64
|
||||
|
||||
minikube_resource() {
|
||||
echo "minikube-linux-amd64"
|
||||
}
|
||||
|
||||
install_minikube() {
|
||||
tempfile="$(mktemp)"
|
||||
|
|
@ -14,4 +17,4 @@ install_minikube() {
|
|||
mv "${tempfile}" "$(systemd-path user-binaries)"/minikube
|
||||
}
|
||||
|
||||
github_update "${package}" "${repo}" "${resource}" install_minikube
|
||||
github_update "${package}" "${repo}" minikube_resource install_minikube
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ IFS=$'\n\t'
|
|||
|
||||
package=uv
|
||||
repo=astral-sh/uv
|
||||
resource=uv-x86_64-unknown-linux-gnu.tar.gz
|
||||
|
||||
uv_resource() {
|
||||
echo "uv-x86_64-unknown-linux-gnu.tar.gz"
|
||||
}
|
||||
|
||||
install_uv() {
|
||||
tempdir="$(mktemp --directory)"
|
||||
|
|
@ -14,4 +17,4 @@ install_uv() {
|
|||
mv --force "${tempdir}"/uv "${tempdir}"/uvx "$(systemd-path user-binaries)"
|
||||
}
|
||||
|
||||
github_update "${package}" "${repo}" "${resource}" install_uv
|
||||
github_update "${package}" "${repo}" uv_resource install_uv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue