#!/bin/bash

echo "arg: $1"

this_path="$(dirname "$0")"
export LD_LIBRARY_PATH=$this_path/../lib/runtime_lib
echo "lib: export LD_LIBRARY_PATH=$this_path/../lib/runtime_lib"
prog_file=$1
export prog_file="${prog_file/.bas/""}"
echo "cmd: $this_path/rcbasic \"$PWD/$prog_file\""
echo "$$" > "$this_path/rc_run_pid.txt"
exec "$this_path/rc_process"
