Files
2023-11-20 09:51:04 +08:00

35 lines
944 B
Bash
Executable File

#!/bin/bash -e
COMMUNITY="alpha"
#-------------------------------------------------------
# Part 1: Check for and handle command-line arguments
#-------------------------------------------------------
TIME_WARP=10
for ARGI; do
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
printf "%s [SWITCHES] [time_warp] \n" $0
printf " --help, -h \n"
exit 0;
elif [ "${ARGI//[^0-9]/}" = "$ARGI" -a "$TIME_WARP" = 1 ]; then
TIME_WARP=$ARGI
else
printf "Bad Argument: %s \n" $ARGI
exit 0
fi
done
#-------------------------------------------------------
# Part 2: Launch the processes
#-------------------------------------------------------
printf "Launching the %s MOOS Community (WARP=%s) \n" $COMMUNITY $TIME_WARP
pAntler $COMMUNITY.moos --MOOSTimeWarp=$TIME_WARP >& /dev/null &
uMAC -t $COMMUNITY.moos
printf "Killing all processes ... \n"
kill %1
mykill
printf "Done killing processes. \n"