#!/bin/sh
# Poracode standalone launcher (standalone runtime format 1).
# Generated by scripts/build-standalone-archive.mjs. Runs this release's server
# CLI with its bundled Node, following links from a PATH directory.
set -e
self=$0
case $self in
  */*) ;;
  *) self=$(command -v "$self") || { echo "poracode: cannot locate this launcher" >&2; exit 127; } ;;
esac
while [ -h "$self" ]; do
  link=$(readlink "$self")
  case $link in
    /*) self=$link ;;
    *) self=$(dirname "$self")/$link ;;
  esac
done
root=$(CDPATH= cd "$(dirname "$self")/.." && pwd -P)
exec "$root/runtime/node" "$root/lib/server.cjs" "$@"
