#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -z "$NODE_PATH" ]; then
  export NODE_PATH="/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/agents/dist/bin/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/agents/dist/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/agents/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules:/html/vocodemo/node_modules/.pnpm/node_modules"
else
  export NODE_PATH="/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/agents/dist/bin/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/agents/dist/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/agents/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules/@livekit/node_modules:/html/vocodemo/node_modules/.pnpm/@livekit+agents@1.9.0_@livekit+rtc-node@0.13.35_@types+node@22.20.1_typescript@5.9.3_zod@4.4.3/node_modules:/html/vocodemo/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
  exec "$basedir/node"  "$basedir/../@livekit/agents/dist/bin/livekit-agents.js" "$@"
else
  exec node  "$basedir/../@livekit/agents/dist/bin/livekit-agents.js" "$@"
fi
