Short-circuit installation commands on failure

This commit is contained in:
Ohad Livne 2026-04-11 00:00:50 +03:00
parent 6b27d7e5e2
commit 34d62d92b2
Signed by: libohad-dev
GPG key ID: 34FDC68B51191A4D
5 changed files with 16 additions and 16 deletions

View file

@ -11,8 +11,8 @@ dolt_resource() {
}
install_dolt() {
tar xz --directory="$(systemd-path user-binaries)" --strip-components=2 dolt-linux-amd64/bin/dolt
chmod 550 "$(systemd-path user-binaries)"/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}" dolt_resource install_dolt

View file

@ -11,8 +11,8 @@ kingfisher_resource() {
}
install_kingfisher() {
tar xz --directory="$(systemd-path user-binaries)" kingfisher
chmod 550 "$(systemd-path user-binaries)"/kingfisher
tar xz --directory="$(systemd-path user-binaries)" kingfisher && \
chmod 550 "$(systemd-path user-binaries)"/kingfisher
}
github_update "${package}" "${repo}" kingfisher_resource install_kingfisher

View file

@ -11,10 +11,10 @@ minikube_resource() {
}
install_minikube() {
tempfile="$(mktemp)"
cat - > "${tempfile}"
chmod 550 "${tempfile}"
mv "${tempfile}" "$(systemd-path user-binaries)"/minikube
tempfile="$(mktemp)" && \
cat - > "${tempfile}" && \
chmod 550 "${tempfile}" && \
mv "${tempfile}" "$(systemd-path user-binaries)"/minikube
}
github_update "${package}" "${repo}" minikube_resource install_minikube

View file

@ -11,10 +11,10 @@ rust_analyzer_resource() {
}
install_rust_analyzer() {
tempfile="$(mktemp)"
gunzip --to-stdout - > "${tempfile}"
chmod 550 "${tempfile}"
mv "${tempfile}" "$(systemd-path user-binaries)"/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

View file

@ -11,10 +11,10 @@ uv_resource() {
}
install_uv() {
tempdir="$(mktemp --directory)"
tar xz --directory="${tempdir}" --strip-components=1 && \
chmod 550 "${tempdir}"/uv "${tempdir}"/uvx && \
mv --force "${tempdir}"/uv "${tempdir}"/uvx "$(systemd-path user-binaries)"
tempdir="$(mktemp --directory)" && \
tar xz --directory="${tempdir}" --strip-components=1 && \
chmod 550 "${tempdir}"/uv "${tempdir}"/uvx && \
mv --force "${tempdir}"/uv "${tempdir}"/uvx "$(systemd-path user-binaries)"
}
github_update "${package}" "${repo}" uv_resource install_uv