迁移分支
This commit is contained in:
39
missions/s1_alpha/launch.sh
Executable file
39
missions/s1_alpha/launch.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash -e
|
||||
#----------------------------------------------------------
|
||||
# Script: launch.sh
|
||||
# Author: Michael Benjamin
|
||||
# LastEd: May 20th 2019
|
||||
#----------------------------------------------------------
|
||||
# Part 1: Set Exit actions and declare global var defaults
|
||||
#----------------------------------------------------------
|
||||
TIME_WARP=1
|
||||
COMMUNITY="alpha"
|
||||
GUI="yes"
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Part 2: Check for and handle command-line arguments
|
||||
#----------------------------------------------------------
|
||||
for ARGI; do
|
||||
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
|
||||
echo "launch.sh [SWITCHES] [time_warp] "
|
||||
echo " --help, -h Show this help message "
|
||||
exit 0;
|
||||
elif [ "${ARGI}" = "--nogui" ] ; then
|
||||
GUI="no"
|
||||
elif [ "${ARGI//[^0-9]/}" = "$ARGI" -a "$TIME_WARP" = 1 ]; then
|
||||
TIME_WARP=$ARGI
|
||||
else
|
||||
echo "launch.sh Bad arg:" $ARGI " Exiting with code: 1"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Part 3: Launch the processes
|
||||
#----------------------------------------------------------
|
||||
echo "Launching $COMMUNITY MOOS Community with WARP:" $TIME_WARP
|
||||
pAntler $COMMUNITY.moos --MOOSTimeWarp=$TIME_WARP >& /dev/null &
|
||||
|
||||
uMAC -t $COMMUNITY.moos
|
||||
kill -- -$$
|
||||
Reference in New Issue
Block a user