server/process/cron/preview.cron
2020-08-16 16:00:27 +02:00

18 lines
439 B
Bash
Executable file

#!/bin/bash
(
[ "$PREVIEW" != "yes" ] && exit
[ -z "${ERESSEA}" ] && ERESSEA="$HOME/eressea"
eval "$(luarocks path)"
branch="develop"
if [ -e "${ERESSEA}/build/.preview" ]; then
branch=$(cat "${ERESSEA}/build/.preview")
fi
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"