From 91ce1e666f22214841bceb3ba853b82d7cc3df29 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Sun, 7 Mar 2021 13:50:54 +0100 Subject: [PATCH] docbook-build.sh cron script This script is intended to be scheduled with cron for automated builds of the MantisBT manual. This is the original version of the script, that was deployed to the server following the 2017 upgrade. --- docbook-builds.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 docbook-builds.sh diff --git a/docbook-builds.sh b/docbook-builds.sh new file mode 100755 index 0000000..5e6d167 --- /dev/null +++ b/docbook-builds.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# MantisBT manuals build + +LOGFILE=/var/log/$(basename $0).log + +# references to build +refs=origin/master-1.3.x,origin/master + +# MantisBT repository +repo=/srv/mantisbt + +# Target directory for manuals +docs=/srv/www/docs + +# Languages to build (blank = all) +lang= + +# Force build +if [[ "$1" = "-f" ]] || [[ "$1" = "--force" ]] +then + force="--force" +fi + +echo $(date +"%F %T") ' Building MantisBT manuals' >>$LOGFILE +/srv/mantisbt-tools/docbook-manual-repo.py --all $force --ref=$refs $repo $docs $lang >>$LOGFILE 2>&1 +echo $(date +"%F %T") ' Build complete' >>$LOGFILE +echo "--------------------------------------------" >>$LOGFILE