Auto-link legacy ARM64 musl node assets

This commit is contained in:
mm644706215
2026-03-21 15:38:26 +08:00
parent 40e0704dc9
commit 182623f67c
6 changed files with 84 additions and 0 deletions

View File

@@ -1,6 +1,8 @@
#!/bin/sh
# Shared OpenClaw Node.js runtime/version helpers.
OPENCLAW_LEGACY_ARM64_MUSL_INTERPRETER="${OPENCLAW_LEGACY_ARM64_MUSL_INTERPRETER:-/opt/openclaw/node/lib/ld-musl-aarch64.so.1}"
oc_normalize_node_version() {
local version="${1:-}"
local old_ifs
@@ -67,6 +69,15 @@ oc_read_node_version() {
oc_normalize_node_version "$version"
}
oc_node_requires_opt_compat() {
local node_bin="${1:-}"
[ -n "$node_bin" ] || return 1
[ -f "$node_bin" ] || return 1
grep -aqF "$OPENCLAW_LEGACY_ARM64_MUSL_INTERPRETER" "$node_bin"
}
oc_select_node_release_asset_url() {
local json_file="${1:-}"
local node_arch="${2:-}"