#!/bin/sh
# Gyblos seller 0.1.0-beta.12: runs the bundled seller on its own Node runtime.
set -eu
self=$0
while [ -L "$self" ]; do
  link=$(readlink "$self")
  case $link in
    /*) self=$link ;;
    *) self=$(dirname "$self")/$link ;;
  esac
done
root=$(CDPATH= cd -- "$(dirname -- "$self")/.." && pwd -L)
GYBLOS_PACKAGED=1
GYBLOS_LAUNCHER=$root/bin/gyblos
GYBLOS_VERSION=0.1.0-beta.12
export GYBLOS_PACKAGED GYBLOS_LAUNCHER GYBLOS_VERSION
# Only this package decides its run mode, its Node options and where its modules come from.
unset GYBLOS_CONTAINER NODE_OPTIONS NODE_PATH NAPI_RS_NATIVE_LIBRARY_PATH
exec "$root/runtime/node" "$root/lib/gyblos.mjs" "$@"
