summaryrefslogtreecommitdiff
path: root/buildbot/make_auditor_reports.sh
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-11-29 14:55:15 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-11-29 14:55:15 +0100
commitc0da0629463a820321f4ddbb5a8490339fd451bb (patch)
tree22ad93efa495e86ffb2113a44cee6b37acd421b4 /buildbot/make_auditor_reports.sh
parent5670d45bf54281523e7ec7278021d633386cbb95 (diff)
downloaddeployment-c0da0629463a820321f4ddbb5a8490339fd451bb.tar.gz
deployment-c0da0629463a820321f4ddbb5a8490339fd451bb.tar.bz2
deployment-c0da0629463a820321f4ddbb5a8490339fd451bb.zip
PDF reports generation.
The script got polished until the invocation of 'pdflatex'. Current issue is how to get the "wire" reports from the auditor tool.
Diffstat (limited to 'buildbot/make_auditor_reports.sh')
-rwxr-xr-xbuildbot/make_auditor_reports.sh23
1 files changed, 16 insertions, 7 deletions
diff --git a/buildbot/make_auditor_reports.sh b/buildbot/make_auditor_reports.sh
index fdd1b12..1d6c36a 100755
--- a/buildbot/make_auditor_reports.sh
+++ b/buildbot/make_auditor_reports.sh
@@ -2,8 +2,8 @@
# Remove once ready!
-echo "Auditor report generation is work in progress.."
-return 1
+# echo "Auditor report generation is work in progress.."
+# return 1
# 1 generate reports.
@@ -13,26 +13,35 @@ if test -z ${TALER_DEPLOYMENT}; then
fi
ACTIVE_COLOR=$(sudo -u ${TALER_DEPLOYMENT} cat /home/${TALER_DEPLOYMENT}/active)
+
+if test -z ${ACTIVE_COLOR}; then
+ echo "Could not outline what the active color is"
+ exit 1
+fi
+
DATE=$(date +%Y-%m-%d)
REPORT_FILE=/home/${ACTIVE_COLOR}/audit_report.${DATE}
SUDO_COLOR="sudo -u ${ACTIVE_COLOR}"
JINJA_TEMPLATE="auditor-report.tex.j2"
REPORTS_DIRECTORY="/home/${TALER_DEPLOYMENT}/reports"
-${SUDO_COLOR} taler-auditor > ${REPORT_FILE}.txt
+${SUDO_COLOR} sh -c "taler-auditor > ${REPORT_FILE}.txt"
# 2 convert them into PDF.
# 3 put them into nginx-served directory.
-${SUDO_COLOR} ./render_auditor_reports.py \
- "${REPORT_FILE}.txt" > "${REPORT_FILE}.tex" \
- < ${JINJA_TEMPLATE}
+${SUDO_COLOR} sh -c \
+ "./render_auditor_reports.py \
+ ${REPORT_FILE}.txt > ${REPORT_FILE}.tex \
+ < ${JINJA_TEMPLATE}"
${SUDO_COLOR} pdflatex \
--output-directory $REPORTS_DIRECTORY \
"${REPORT_FILE}.tex"
${SUDO_COLOR} rm
- "$REPORTS_DIRECTORY/${REPORT_FILE}.log"
+ "${REPORT_FILE}.log"
+ "${REPORT_FILE}.tex"
+ "${REPORT_FILE}.txt"
echo "The file ${REPORT_FILE}.pdf" has been correctly generated.