#!/bin/sh

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

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

sync
../../scripts/rt_modprobe ../../modules/rtai_lxrt.o

echo
echo "Now start the realtime process <enter>:"
read junk

$SUDO ./test 

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

../../scripts/rt_rmmod rtai_lxrt
rm -f rtfile
