#!/bin/bash

this_path="$(dirname "$0")"
pushd $this_path
this_path=$PWD
popd

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_studio_run \"$PWD/$prog_file\""
# echo "$$" > "$this_path/../run_pid.txt"
exec "$this_path/rc_process"
