khanat-opennel-code/code/ryzom/tools/scripts/linux/ryzom_domain_screen_wrapper.sh
StudioEtrange 91e6b23d3f ** PCH Support for NMake with VS2012
NMAKE-VS2012 Error LNK2011
while NMAKE-VS2010 does not complain
we need to link the pch.obj file
see http://msdn.microsoft.com/en-us/library/3ay26wa2(v=vs.110).aspx

** PCH Support for Ninja
Ninja need to add property
        OBJECT_DEPENDS for using PCH
        OBJECT_OUTPUTS for create PCH
see http://public.kitware.com/pipermail/cmake-developers/2012-March/003653.html
2013-09-05 17:18:01 +02:00

88 lines
2 KiB
Bash
Executable file

#!/bin/sh
CMD=$1
#DOMAIN=$(pwd|sed s%/home/nevrax/%%)
DOMAIN=shard
if [ "$CMD" == "" ]
then
echo
echo Screen sessions currently running:
screen -list
echo
echo "Commands:"
echo " 'start' to start the shard"
echo " 'stop' to stop the ${DOMAIN}"
echo " 'join' to join the ${DOMAIN}'s screen session"
echo " 'share' to join the screen session in shared mode"
echo " 'state' to view state information for the ${DOMAIN}"
echo
printf "Enter a command: "
read CMD
fi
if [ "$CMD" == "stop" ]
then
if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ]
then
echo Cannot stop domain \'${DOMAIN}\' because no screen by that name appears to be running
screen -list
else
screen -d -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//') -X quit> /dev/null
rm -v */*.state
rm -v */*launch_ctrl ./global.launch_ctrl
fi
fi
STARTARGS=
if [ "$CMD" == "batchstart" ]
then
STARTARGS='-d -m'
CMD='start'
fi
if [ "$CMD" == "start" ]
then
ulimit -c unlimited
screen -wipe > /dev/null
if [ $( screen -list | grep \\\.${DOMAIN} | wc -w ) != 0 ]
then
echo Cannot start domain \'${DOMAIN}\' because this domain is already started
screen -list | grep $DOMAIN
else
screen $STARTARGS -S ${DOMAIN} -c ${DOMAIN}.screen.rc
fi
fi
if [ "$CMD" == "join" ]
then
if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ]
then
echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running
screen -list
else
screen -r $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//')
fi
fi
if [ "$CMD" == "share" ]
then
if [ $(screen -list | grep \\\.${DOMAIN} | wc -l) != 1 ]
then
echo Cannot join domain \'${DOMAIN}\' because no screen by that name appears to be running
screen -list
else
screen -r -x $(screen -list | grep \\\.${DOMAIN}| sed 's/(.*)//')
fi
fi
if [ "$CMD" == "state" ]
then
echo State of domain ${DOMAIN}:
if [ $(echo */*.state) == "*/*.state" ]
then
echo - No state files found
else
grep RUNNING *state
fi
fi