#!/bin/bash # see README for more information umask 002 . /org/www.debian.org/cron/common.sh # locking if lockfile -! -l 43200 -r 0 "$crondir/lessoften.lock"; then echo `hostname` is unable to start update, lock file exists. >> $crondir/lessoften.log exit 1 fi trap "rm -f $crondir/lessoften.lock" exit # rotate the previous log file savelog $crondir/lessoften.log &> /dev/null echo "starting the lessoften cron job at `date`" > $crondir/lessoften.log echo "creating mailing-lists.txt..." >> $crondir/lessoften.log make -s -C $webtopdir/webwml/english/MailingLists mailing-lists.txt install -m 664 -g debwww \ $webtopdir/webwml/english/MailingLists/mailing-lists.txt \ $webdir/misc/mailing-lists.txt echo "copying events/materials/ in place..." >> $crondir/lessoften.log install -d -m 2775 -g debwww $webdir/events/materials cp -a $webtopdir/events-materials/* $webdir/events/materials/ # until we can actually build it on the server echo "copying sarge installmanual in place..." >> $crondir/lessoften.log cp -a $webtopdir/installmanual/sarge/* $webdir/releases/sarge/ # previously in parts/1l10ndata, from bouz [ -d $crondir/datafiles ] || mkdir -p $crondir/datafiles cd $crondir/datafiles echo "updating the database file used to display l10n stats..." >> $crondir/lessoften.log wget -q -N http://people.debian.org/~pmachard/l10n/material/data/unstable.gz || { echo "couldn't fetch data/unstable!" >> $crondir/lessoften.log; exit 1; } gunzip -c -f unstable.gz > unstable.gluck ln -sf $crondir/datafiles/unstable.gluck $webtopdir/webwml/english/international/l10n/data/unstable.gluck # cleanup rm -f unstable.gz echo "extracting the list of languages..." >> $crondir/lessoften.log cd $webtopdir/webwml/english/international/l10n ./scripts/list-languages.pl data/unstable.gluck > data/langs echo "cleaning up obsolete templates translation information" >> $crondir/lessoften.log cd $webdir/international/l10n find po po-debconf templates -type f -mtime +30 -exec rm -f \{\} \; # the below scripts will echo what they are doing themselves $crondir/people_scripts/update.packages+sources >> $crondir/lessoften.log $crondir/people_scripts/update.people.html >> $crondir/lessoften.log echo " ** lessoften cron job done *** " >> $crondir/lessoften.log