From 90cd77c586e4e7d08c9e43224940ff969b5185a8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 26 Apr 2019 18:56:38 +0200 Subject: [PATCH] preview gets games as arguments, game 4 is over --- process/cron/preview.cron | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/process/cron/preview.cron b/process/cron/preview.cron index eb39fd8f8..63fe2ca76 100755 --- a/process/cron/preview.cron +++ b/process/cron/preview.cron @@ -1,17 +1,17 @@ #!/bin/bash ( [ "$PREVIEW" != "yes" ] && exit -[ -z ${ERESSEA} ] && ERESSEA=$HOME/eressea +[ -z "${ERESSEA}" ] && ERESSEA="$HOME/eressea" branch="develop" -if [ -e ${ERESSEA}/build/.preview ]; then - branch=`cat ${ERESSEA}/build/.preview` +if [ -e "${ERESSEA}/build/.preview" ]; then + branch=$(cat "${ERESSEA}/build/.preview") fi -SRC=${ERESSEA}/git -${SRC}/s/preview build ${branch} || exit $? -for game in 2 3 4 ; do - ${SRC}/s/preview -g ${game} run && \ - ${SRC}/s/preview -g ${game} send +SRC="${ERESSEA}/git" +"${SRC}/s/preview" build "$branch" || exit $? +for game in "$@" ; do + "${SRC}/s/preview" -g "$game" run && \ + "${SRC}/s/preview" -g "$game" send done -) | tee -a $HOME/log/preview.cron.log +) | tee -a "$HOME/log/preview.cron.log"