#!/bin/bash
echo "starting nc_server_64...
"

cd ~/nc/nc-server
# ../bin/bin_osx_x64/lj nc/nc-server.lua

if [ -f "run/runner.lua" ] ; then
	if [ -f "../bin/bin_osx_arm64/lj" ] ; then
		../bin/bin_osx_arm64/lj run/runner.lua nc/nc-server ../bin/bin_osx_arm64/lj
	else
		../bin/bin_osx_x64/lj run/runner.lua nc/nc-server ../bin/bin_osx_x64/lj
	fi
fi
if [ -f "run/runner.lx" ] ; then
	if [ -f "../bin/bin_osx_arm64/lj" ] ; then
		../bin/bin_osx_arm64/lj run/runner.lx nc/nc-server ../bin/bin_osx_arm64/lj
	else
  	../bin/bin_osx_x64/lj run/runner.lx nc/nc-server ../bin/bin_osx_x64/lj
	fi
fi

echo "
nc_server_64 application has been quit, press return to close this window"
read
