Created
July 31, 2025 06:20
-
-
Save skull-squadron/b54cadd1d99eaf4a6c925aadec4edfca to your computer and use it in GitHub Desktop.
Install Garage from source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -xEeuo pipefail | |
default_features=( | |
bundled-libs | |
metrics | |
lmdb | |
sqlite | |
) | |
other_features=( | |
k2v | |
kubernetes-discovery | |
telemetry-otlp | |
syslog | |
) | |
garage_features="${garage_features:-$(IFS=','; echo "${default_features[*]},${other_features[*]}")}" | |
garage_k2v_cli_features="${garage_k2v_cli_features:-cli}" | |
cleanup() { | |
rm -rf "$CARGO_HOME" | |
} | |
CARGO_HOME= | |
trap 'e=$?; trap - EXIT; cleanup; exit $e' EXIT | |
export CARGO_HOME="$(mktemp)" | |
repo="${repo:-https://git.deuxfleurs.fr/Deuxfleurs/garage}" | |
cargo install --git "$repo" --locked --no-default-features --features="$garage_features" garage | |
cargo install --git "$repo" --locked --no-default-features --features="$garage_k2v_cli_features" k2v-client | |
for exe in garage k2v-cli; do | |
install -vDm755 "$CARGO_HOME/bin/$exe" -t /usr/local/bin | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment