Commit afcadb2e authored by Kristina Hoeppner's avatar Kristina Hoeppner

Merge branch 'old-versions-monthly' into 'master'

Old versions monthly

Hi - this modifies the packaging to create a monthly cron job to run the old manuals, and removes them from the daily cron job. It also adds a timestamp to the logging so we can see when things happened. Builds and installs okay on my LXC box.

See merge request !1
parents bf853b96 b70ffc5a
*.changes
*.deb
maharadocs-1.5/debian/files
maharadocs-1.5/debian/maharadocs.debhelper.log
......
maharadocs (16.10-1) stable; urgency=medium
* Move old versions of manuals from daily to monthly cron.
* New cron job in /etc/cron.monthly to build old versions.
* Adds a timestamp to the log.
-- Jonathan Harker <jonathan@catalyst.net.nz> Thu, 13 Oct 2016 12:57:31 +1300
maharadocs (15.04-4) stable; urgency=medium
* Adding generation for 15.10
......
......@@ -11,15 +11,14 @@ LOGDIR=$RET
LOGFILE=${LOGDIR}/update.log
cd $INSTALLDIR
# Add a useful timestamp
echo ==================================== >> $LOGFILE
date '+%Y-%m-%d %H:%M:%S %Z' >> $LOGFILE
echo ==================================== >> $LOGFILE
git pull >> $LOGFILE
make -C $INSTALLDIR update html epub MAHARA=1.4 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.5 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.6 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.7 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.8 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.9 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.10 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=15.04 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=15.10 >> $LOGFILE 2>&1
# Move old versions to the monthly cron in /etc/cron.monthly/
make -C $INSTALLDIR update html epub MAHARA=16.04 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=16.10 >> $LOGFILE 2>&1
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
. /usr/share/debconf/confmodule
PACKAGE=`basename $0 .postinst`
db_get maharadocs/installdir
INSTALLDIR=$RET
db_get maharadocs/logdir
LOGDIR=$RET
LOGFILE=${LOGDIR}/update.log
cd $INSTALLDIR
# Add a useful timestamp
echo ==================================== >> $LOGFILE
echo Monthly run >> $LOGFILE
date '+%Y-%m-%d %H:%M:%S %Z' >> $LOGFILE
echo ==================================== >> $LOGFILE
git pull >> $LOGFILE
make -C $INSTALLDIR update html epub MAHARA=1.4 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.5 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.6 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.7 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.8 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.9 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=1.10 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=15.04 >> $LOGFILE 2>&1
make -C $INSTALLDIR update html epub MAHARA=15.10 >> $LOGFILE 2>&1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment