← All Pull Requests
install.sh: don't fail the install on non-x86_64 (fixes adom/core auto-update on Apple Silicon) #2
Since 1.9.62, install.sh exits 1 on any non-x86_64 machine, which rolls back the package and fails every adom/core auto-update on Apple Silicon Hydrogen workspaces (aarch64). This change skips only the binary on archs with no build, still installs the skills and completion, and exits 0 with a warning; the x86_64 download and sha256 path is unchanged.
Tested on an aarch64 workspace (exit 0, skills and completion installed, warning printed) and on the x86_64 path via a uname -m shim (1.9.62 binary downloaded and sha256 verified). It needs a version bump and publish to reach the fleet; an aarch64 release asset would be the real follow-up.
🤖 Generated with Claude Code
Diff Skip to comments (1)
@@ -1,62 +1,74 @@⋯ 11 unchanged lines ⋯ BIN_DIR="${HOME}/.local/bin" mkdir -p "$BIN_DIR" VER="$(sed -n 's/^ *"version": *"\([0-9][0-9.]*\)".*/\1/p' "$DIR/package.json" | head -1)"-case "$(uname -m)" in- x86_64|amd64) ;;- *) echo "adom-tts: no $(uname -m) build yet (x86_64 Linux only). Ask on https://wiki.adom.inc/adom/adom-tts/issues" >&2; exit 1 ;;+# Only x86_64 has a release binary so far. On any other arch, skip the binary but still install+# the skills and completion, and exit 0: a non-zero exit rolls back the whole package, and because+# adom/core depends on adom-tts it also fails every core auto-update on that machine (every Apple+# Silicon Hydrogen workspace is aarch64).+ARCH="$(uname -m)"+case "$ARCH" in+ x86_64|amd64) HAVE_BUILD=1 ;;+ *) HAVE_BUILD=0 ;; esac-URL="https://wiki.adom.inc/download/adom/adom-tts/${VER}/adom-tts"-WANT="$(cut -d' ' -f1 "$DIR/bin/adom-tts.sha256")"-TMP="$(mktemp)"-trap 'rm -f "$TMP"' EXIT-got=""-# Retries cover the seconds between publishing a version and uploading its binary.-for attempt in 1 2 3 4 5 6; do- if curl -fsSL --max-time 120 "$URL" -o "$TMP"; then- got="$(sha256sum "$TMP" | cut -d' ' -f1)"- [ "$got" = "$WANT" ] && break- fi+if [ "$HAVE_BUILD" = 1 ]; then+ URL="https://wiki.adom.inc/download/adom/adom-tts/${VER}/adom-tts"+ WANT="$(cut -d' ' -f1 "$DIR/bin/adom-tts.sha256")"+ TMP="$(mktemp)"+ trap 'rm -f "$TMP"' EXIT got=""- [ "$attempt" -lt 6 ] && sleep 5-done-if [ -z "$got" ]; then- echo "adom-tts: could not download the ${VER} binary from $URL (or its sha256 did not match $WANT)." >&2- if [ -x "$BIN_DIR/adom-tts" ]; then echo " Your installed $("$BIN_DIR/adom-tts" --version 2>/dev/null) is unchanged. Retry: adom-wiki pkg install adom/adom-tts" >&2; fi- exit 1+ # Retries cover the seconds between publishing a version and uploading its binary.+ for attempt in 1 2 3 4 5 6; do+ if curl -fsSL --max-time 120 "$URL" -o "$TMP"; then+ got="$(sha256sum "$TMP" | cut -d' ' -f1)"+ [ "$got" = "$WANT" ] && break+ fi+ got=""+ [ "$attempt" -lt 6 ] && sleep 5+ done+ if [ -z "$got" ]; then+ echo "adom-tts: could not download the ${VER} binary from $URL (or its sha256 did not match $WANT)." >&2+ if [ -x "$BIN_DIR/adom-tts" ]; then echo " Your installed $("$BIN_DIR/adom-tts" --version 2>/dev/null) is unchanged. Retry: adom-wiki pkg install adom/adom-tts" >&2; fi+ exit 1+ fi+ install -m 0755 "$TMP" "$BIN_DIR/adom-tts"+ echo "Installed adom-tts ${VER} -> $BIN_DIR/adom-tts (sha256 verified)"+else+ echo "adom-tts: no ${ARCH} build yet (x86_64 Linux only), so the adom-tts binary was NOT installed;" >&2+ echo " the skills and completion still are. Ask on https://wiki.adom.inc/adom/adom-tts/issues" >&2 fi-install -m 0755 "$TMP" "$BIN_DIR/adom-tts"-echo "Installed adom-tts ${VER} -> $BIN_DIR/adom-tts (sha256 verified)" # 2) Claude Code skill (user tier only — dev/publish skills stay in source). SKILL_DIR="${HOME}/.claude/skills"⋯ 12 unchanged lines ⋯ install -m 0644 "$DIR/completions/adom-tts.bash" "$COMP_DIR/adom-tts" || true fi +[ "$HAVE_BUILD" = 1 ] || exit 0 echo echo "adom-tts installed. Verify the shared voice service is reachable:" echo " adom-tts health" echo "Then try drive mode:" echo " adom-tts say \"Read me your last answer, I'm driving.\" --out /tmp/x.mp3 --play"+
Comments
Log in to comment.