From ba71728a648b17a4468e966a49d34303ebfc51a1 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 9 Jan 2015 20:41:48 +0100 Subject: [PATCH] preview build script checks for a branch to build from (in build/.preview) fix int to bool conversions --- s/cron/previews.sh | 16 ++++++++++------ src/kernel/order.c | 6 ++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/s/cron/previews.sh b/s/cron/previews.sh index 7c9f8bb95..6e30c75c5 100755 --- a/s/cron/previews.sh +++ b/s/cron/previews.sh @@ -1,9 +1,13 @@ #!/bin/sh -[ -z $ERESSEA ] && ERESSEA=$HOME/eressea -SRC=$ERESSEA/git -$SRC/s/preview build master -$SRC/s/preview version +[ -z ${ERESSEA} ] && ERESSEA=~/eressea +branch="master" +if [ -e ${ERESSEA}/build/.preview ]; then + branch=`cat ${ERESSEA}/build/.preview` +fi +SRC=${ERESSEA}/git +${SRC}/s/preview build ${branch} +${SRC}/s/preview version for game in 2 3 4 ; do - $SRC/s/preview -g $game run && \ - $SRC/s/preview -g $game send + ${SRC}/s/preview -g ${game} run && \ + ${SRC}/s/preview -g ${game} send done diff --git a/src/kernel/order.c b/src/kernel/order.c index bf1001469..ed0c1642b 100644 --- a/src/kernel/order.c +++ b/src/kernel/order.c @@ -467,7 +467,6 @@ bool is_exclusive(const order * ord) bool is_long(const order * ord) { keyword_t kwd = ORD_KEYWORD(ord); - bool result = false; switch (kwd) { case K_CAST: @@ -494,9 +493,9 @@ bool is_long(const order * ord) return true; default: - result = false; + break; } - return result; + return false; } /** @@ -524,7 +523,6 @@ bool is_persistent(const order * ord) default: return persist || is_repeated(ord); } - } char *write_order(const order * ord, char *buffer, size_t size)