Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72ac6f8774 | |||
| fde053a27e |
+19
-2
@@ -19,7 +19,12 @@
|
|||||||
# 0 — installed successfully
|
# 0 — installed successfully
|
||||||
# 1 — error (unsupported arch, download failure, permission denied)
|
# 1 — error (unsupported arch, download failure, permission denied)
|
||||||
|
|
||||||
set -euo pipefail
|
# POSIX-friendly: -eu is universal, pipefail only on shells that
|
||||||
|
# support it (bash, ksh, dash >= 0.5.12). Without pipefail the
|
||||||
|
# installer still exits on the first hard error since every curl/
|
||||||
|
# tar/install step is checked explicitly.
|
||||||
|
set -eu
|
||||||
|
(set -o pipefail) 2>/dev/null && set -o pipefail || true
|
||||||
|
|
||||||
REPO="${SKELETONKEY_REPO:-KaraZajac/SKELETONKEY}"
|
REPO="${SKELETONKEY_REPO:-KaraZajac/SKELETONKEY}"
|
||||||
VERSION="${SKELETONKEY_VERSION:-latest}"
|
VERSION="${SKELETONKEY_VERSION:-latest}"
|
||||||
@@ -32,7 +37,19 @@ fail() { printf '[\033[1;31m-\033[0m] %s\n' "$*" >&2; exit 1; }
|
|||||||
# Detect architecture
|
# Detect architecture
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
case "$arch" in
|
case "$arch" in
|
||||||
x86_64|amd64) target=x86_64 ;;
|
# x86_64 default: the musl-static binary works on every libc
|
||||||
|
# (glibc 2.x of any version, musl, uclibc) — costs ~800 KB extra
|
||||||
|
# vs the dynamic build but eliminates the GLIBC_2.NN portability
|
||||||
|
# ceiling that bit users on Debian-stable / older RHEL hosts.
|
||||||
|
# Set SKELETONKEY_DYNAMIC=1 to fetch the smaller dynamic build
|
||||||
|
# (needs glibc >= 2.38, i.e. Ubuntu 24.04 / Debian 13 / RHEL 10).
|
||||||
|
x86_64|amd64)
|
||||||
|
if [ "${SKELETONKEY_DYNAMIC:-0}" = "1" ]; then
|
||||||
|
target=x86_64
|
||||||
|
else
|
||||||
|
target=x86_64-static
|
||||||
|
fi
|
||||||
|
;;
|
||||||
aarch64|arm64) target=arm64 ;;
|
aarch64|arm64) target=arm64 ;;
|
||||||
*) fail "Unsupported architecture: $arch (only x86_64 and arm64 currently)" ;;
|
*) fail "Unsupported architecture: $arch (only x86_64 and arm64 currently)" ;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user