#!/usr/bin/env bash # Start the Bare ELF shipped with this install. Never use a bare from PATH. set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" case "$(uname -m)" in x86_64|amd64) PLATFORM_BIN="${ROOT}/node_modules/bare-runtime-linux-x64/bin/bare" ;; aarch64|arm64) PLATFORM_BIN="${ROOT}/node_modules/bare-runtime-linux-arm64/bin/bare" ;; *) echo "Unsupported architecture: $(uname -m)" >&2; exit 2 ;; esac if [[ -x "${ROOT}/runtime/bare" && ! -L "${ROOT}/runtime/bare" ]]; then BIN="${ROOT}/runtime/bare" else BIN="${PLATFORM_BIN}" fi if [[ ! -x "${BIN}" ]]; then echo "This Jarvis install has no Bare runtime at ${BIN}." >&2 echo "Install the official rolling bundle. A Bare binary from PATH is not used." >&2 exit 1 fi exec "${BIN}" "$@"