From 54d7ea19a42b96abcb494868fd5921c5e72812ce Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 30 Jul 2019 15:26:15 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Bug=202591:=20Datenbank=20enth=C3=A4lt=20fa?= =?UTF-8?q?slches=20Passwort=20f=C3=BCr=20neue=20Parteien.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/run-turn.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run-turn.lua b/scripts/run-turn.lua index 0540d2321..e5c90a7be 100644 --- a/scripts/run-turn.lua +++ b/scripts/run-turn.lua @@ -95,11 +95,11 @@ local function write_htpasswd() end local function write_files(locales) + write_reports() + write_summary() write_database() write_passwords() write_htpasswd() - write_reports() - write_summary() end local function write_scores() From 01110e86764ba8e84c2deaadffcd2da880eab458 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 31 Jul 2019 08:43:23 +0200 Subject: [PATCH 2/2] shellcheck: negative exit and -z vs -n --- process/compress.sh | 4 ++-- process/send-bz2-report | 2 +- process/send-zip-report | 4 ++-- process/sendreport.sh | 6 +++--- process/sendreports.sh | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/process/compress.sh b/process/compress.sh index 4c0147978..21ac828ef 100755 --- a/process/compress.sh +++ b/process/compress.sh @@ -2,7 +2,7 @@ if [ -z "$ERESSEA" ]; then echo "You need to define the \$ERESSEA environment variable to run $0" - exit -2 + exit 2 fi GAME="$ERESSEA/game-$1" @@ -16,7 +16,7 @@ fi if [ ! -d "$GAME/reports" ]; then echo "cannot find reports directory in $GAME" - exit -1 + exit 1 fi cd "$GAME/reports" || exit diff --git a/process/send-bz2-report b/process/send-bz2-report index 51a8113bf..3eabeca30 100755 --- a/process/send-bz2-report +++ b/process/send-bz2-report @@ -5,7 +5,7 @@ if [ -z "$ERESSEA" ]; then fi if [ ! -f reports.txt ]; then echo "need to run $0 from the report direcory" - exit -2 + exit 2 fi TEMPLATE=report-mail.txt diff --git a/process/send-zip-report b/process/send-zip-report index a6bd85246..1e3da1933 100755 --- a/process/send-zip-report +++ b/process/send-zip-report @@ -6,7 +6,7 @@ if [ -z "$ERESSEA" ]; then fi if [ ! -f reports.txt ]; then echo "need to run $0 from the report direcory" - exit -2 + exit 2 fi PWD=$(pwd) @@ -33,7 +33,7 @@ fi if [ ! -e "$TEMPLATE" ]; then echo "no such email template: $TEMPLATE" - exit -3 + exit 3 fi while [ -e /tmp/.stopped ] ; do diff --git a/process/sendreport.sh b/process/sendreport.sh index d38b2a14f..c19c664a7 100755 --- a/process/sendreport.sh +++ b/process/sendreport.sh @@ -3,14 +3,14 @@ if [ -z "$ERESSEA" ]; then echo "You have to define the \$ERESSEA environment variable to run $0" - exit -2 + exit 2 fi function abort() { if [ $# -gt 0 ]; then echo "$@" fi - exit -1 + exit 1 } GAME=$1 @@ -47,7 +47,7 @@ fi bash "${FACTION}.sh" "$EMAIL" || reply "Unbekannte Partei $FACTION" OWNER=$("$BIN/getfaction.py" "$PWFILE" "$FACTION") -if [ ! -z "$OWNER" ]; then +if [ -n "$OWNER" ]; then echo "Der Report Deiner Partei wurde an ${EMAIL} gesandt." \ | mutt -s "Reportnachforderung Partei ${FACTION}" "$OWNER" fi diff --git a/process/sendreports.sh b/process/sendreports.sh index d1adba943..c56233367 100755 --- a/process/sendreports.sh +++ b/process/sendreports.sh @@ -5,10 +5,10 @@ if [ -z "$ERESSEA" ]; then echo "You have to define the \$ERESSEA environment variable to run $0" - exit -2 + exit 2 fi -if [ ! -z "$1" ]; then +if [ -n "$1" ]; then GAME="$ERESSEA/game-$1" else GAME=$ERESSEA