12 lines
534 B
Bash
Executable File
12 lines
534 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
case "$(uname -m)" in
|
|
x86_64|amd64) BARE="${ROOT_DIR}/node_modules/bare-runtime-linux-x64/bin/bare" ;;
|
|
aarch64|arm64) BARE="${ROOT_DIR}/node_modules/bare-runtime-linux-arm64/bin/bare" ;;
|
|
*) BARE="" ;;
|
|
esac
|
|
if [[ -f "${BARE}" ]]; then chmod 755 "${BARE}"; else BARE="$(command -v bare || true)"; fi
|
|
[[ -x "${BARE}" ]] || { echo "Bare runtime not found; run npm ci or install the rolling bundle." >&2; exit 1; }
|
|
exec "${BARE}" "$@"
|