mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
tweak to start GTK games and run a long time
I'm trying to fix game-start-time right now....
This commit is contained in:
parent
3a2953427a
commit
1648c9b3e3
1 changed files with 11 additions and 6 deletions
|
@ -3,11 +3,13 @@
|
||||||
set -e -u
|
set -e -u
|
||||||
|
|
||||||
IN_SEQ=''
|
IN_SEQ=''
|
||||||
HTTP=''
|
HTTP='--use-http'
|
||||||
|
CURSES='--curses'
|
||||||
|
SLEEP_SEC=10000
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
[ $# -gt 0 ] && echo "ERROR: $1"
|
[ $# -gt 0 ] && echo "ERROR: $1"
|
||||||
echo "usage: $0 --in-sequence|--at-once [--use-http]"
|
echo "usage: $0 --in-sequence|--at-once [--no-use-http] [--gtk]"
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
||||||
Starts a pair of devices meant to get into the same game. Verification
|
Starts a pair of devices meant to get into the same game. Verification
|
||||||
|
@ -26,8 +28,11 @@ while [ $# -gt 0 ]; do
|
||||||
--at-once)
|
--at-once)
|
||||||
IN_SEQ=0
|
IN_SEQ=0
|
||||||
;;
|
;;
|
||||||
--use-http)
|
--no-use-http)
|
||||||
HTTP=--use-http
|
HTTP=''
|
||||||
|
;;
|
||||||
|
--gtk)
|
||||||
|
CURSES=''
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "unexpected param $1"
|
usage "unexpected param $1"
|
||||||
|
@ -55,7 +60,7 @@ for GAME in $(seq 1); do
|
||||||
# for N in $(seq 1); do
|
# for N in $(seq 1); do
|
||||||
DB=$DB_TMPLATE${GAME}_${N}.sqldb
|
DB=$DB_TMPLATE${GAME}_${N}.sqldb
|
||||||
LOG=$LOG_TMPLATE${GAME}_${N}.log
|
LOG=$LOG_TMPLATE${GAME}_${N}.log
|
||||||
exec ./obj_linux_memdbg/xwords --server --curses --remote-player --name Player \
|
exec ./obj_linux_memdbg/xwords --server $CURSES --remote-player --robot Player \
|
||||||
--room $ROOM --game-dict dict.xwd $HTTP\
|
--room $ROOM --game-dict dict.xwd $HTTP\
|
||||||
--skip-confirm --db $DB --close-stdin --server \
|
--skip-confirm --db $DB --close-stdin --server \
|
||||||
>/dev/null 2>>$LOG &
|
>/dev/null 2>>$LOG &
|
||||||
|
@ -71,7 +76,7 @@ for GAME in $(seq 1); do
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -n "${PIDS}" ] && sleep 10
|
[ -n "${PIDS}" ] && sleep $SLEEP_SEC
|
||||||
for PID in $PIDS; do
|
for PID in $PIDS; do
|
||||||
kill $PID
|
kill $PID
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue