commit 0e1f9cbc76f5700bba9c9abc0436118fec32c5a0 parent 0bd560f6325388c972455af498a61726b5985306 Author: Marcello Stanisci <stanisci.m@gmail.com> Date: Wed, 5 Dec 2018 15:17:21 +0100 Rename variables. Diffstat:
| M | buildbot/make_auditor_reports.sh | | | 28 | ++++++++++++++-------------- |
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/buildbot/make_auditor_reports.sh b/buildbot/make_auditor_reports.sh @@ -21,12 +21,13 @@ if test -z ${ACTIVE_COLOR}; then fi DATE=$(date +%Y-%m-%d) -REPORT_FILE=/home/${ACTIVE_COLOR}/audit_report.${DATE} -WIRE_REPORT_FILE=/home/${ACTIVE_COLOR}/wire_audit_report.${DATE} +REPORT_FILE_NOEXT=/home/${ACTIVE_COLOR}/audit_report.${DATE} +WIRE_REPORT_FILE_NOEXT=/home/${ACTIVE_COLOR}/wire_audit_report.${DATE} SUDO_COLOR="sudo -u ${ACTIVE_COLOR}" JINJA_TEMPLATE="auditor-report.tex.j2" REPORTS_DIRECTORY="/home/${TALER_DEPLOYMENT}/reports" +# Add the exchange into the auditor DB. TALER_AUDITOR_EXCHANGE=$(printf "taler-auditor-exchange -c %s -m %s -u %s" \ '${HOME}/.config/taler.conf' \ '$(taler-config -s exchange -o master_public_key)' \ @@ -36,25 +37,24 @@ CMD=$(printf "%s; %s" \ "source /home/${ACTIVE_COLOR}/activate" \ "${TALER_AUDITOR_EXCHANGE}") -echo About to execute: $CMD ${SUDO_COLOR} bash -c "$CMD" +# Generate first report. ${SUDO_COLOR} bash -c \ "source /home/${ACTIVE_COLOR}/activate; \ - taler-auditor > ${REPORT_FILE}.txt" + taler-auditor > ${REPORT_FILE_NOEXT}.txt" +# Generate "wire" report. ${SUDO_COLOR} bash -c \ "source /home/${ACTIVE_COLOR}/activate; \ - taler-wire-auditor > ${WIRE_REPORT_FILE}.txt" - -# 2 convert them into PDF. -# 3 put them into nginx-served directory. - -if ! ${SUDO_COLOR} sh -c \ - "pwd; whoami; ls -l ${JINJA_TEMPLATE}; ./render_auditor_reports.py \ - ${REPORT_FILE}.txt \ - ${WIRE_REPORT_FILE}.txt \ - > ${REPORT_FILE}.tex \ + taler-wire-auditor > ${WIRE_REPORT_FILE_NOEXT}.txt" + +# Convert them into PDF and put them into nginx-served directory. +if ! sh -c \ + "./render_auditor_reports.py \ + ${REPORT_FILE_NOEXT}.txt \ + ${WIRE_REPORT_FILE_NOEXT}.txt \ + > ${REPORT_FILE_NOEXT}.tex \ < ${JINJA_TEMPLATE}"; then echo echo "Could not generate the TEX template (from Jinja)."