#!/bin/sh

if [ $UID != 0 ]; then
  SUDO="sudo "
else
  SUDO=""
fi

echo
echo "Press <enter> to load LXRT modules:"
read junk

sync
export LD_LIBRARY_PATH=../lib
../../scripts/rt_modprobe ../../modules/rtai_lxrt.o

echo
echo "Now start the realtime process:"
read junk

$SUDO ./rt_process 

echo
echo "Done. Press <enter> to remove the modules."
read junk

../../scripts/rt_rmmod rtai_lxrt
