Commit 21fc723d authored by Jonathan Harker's avatar Jonathan Harker

Move old manual versions to a monthly cron.

 - New cron job in /etc/cron.monthly to build old manual versions.
 - Adds a timestamp to the log.
parent bf853b96
*.changes
*.deb
maharadocs-1.5/debian/files
maharadocs-1.5/debian/maharadocs.debhelper.log
......
......@@ -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