diff --git a/xwords4/linux/scripts/start-pair.sh b/xwords4/linux/scripts/start-pair.sh index 68175be81..767169b6c 100755 --- a/xwords4/linux/scripts/start-pair.sh +++ b/xwords4/linux/scripts/start-pair.sh @@ -2,6 +2,42 @@ set -e -u +IN_SEQ='' +HTTP='' + +usage() { + [ $# -gt 0 ] && echo "ERROR: $1" + echo "usage: $0 --in-sequence|--at-once [--use-http]" + cat </dev/null 2>>$LOG & - PIDS="$PIDS $!" + PID=$! + echo "launched $PID" + if [ $IN_SEQ -eq 1 ]; then + sleep 9 + kill $PID + sleep 1 + elif [ $IN_SEQ -eq 0 ]; then + PIDS="$PIDS $PID" + fi done done -echo "launched $PIDS" - -# --use-http \ - -sleep 10 +[ -n "${PIDS}" ] && sleep 10 for PID in $PIDS; do kill $PID done