| 1 |
joy |
1.1 |
#!/bin/bash |
| 2 |
|
|
|
| 3 |
|
|
# see README for more information |
| 4 |
|
|
|
| 5 |
|
|
umask 002 |
| 6 |
|
|
. /org/www.debian.org/cron/common.sh |
| 7 |
|
|
|
| 8 |
|
|
# locking |
| 9 |
|
|
if lockfile -! -l 43200 -r 0 "$crondir/lessoften.lock"; then |
| 10 |
|
|
echo `hostname` is unable to start update, lock file exists. |
| 11 |
|
|
exit 1 |
| 12 |
|
|
fi |
| 13 |
|
|
trap "rm -f $crondir/lessoften.lock" exit |
| 14 |
|
|
|
| 15 |
|
|
# rotate the previous log file |
| 16 |
|
|
savelog $crondir/lessoften.log &> /dev/null |
| 17 |
|
|
|
| 18 |
|
|
echo "starting the lessoften cron job at `date`" > $crondir/lessoften.log |
| 19 |
|
|
|
| 20 |
|
|
echo "creating mailing-lists.txt..." >> $crondir/lessoften.log |
| 21 |
|
|
make -s -C $webtopdir/webwml/english/MailingLists mailing-lists.txt |
| 22 |
|
|
install -m 664 -g debwww \ |
| 23 |
|
|
$webtopdir/webwml/english/MailingLists/mailing-lists.txt \ |
| 24 |
|
|
$webdir/misc/mailing-lists.txt |
| 25 |
|
|
|
| 26 |
|
|
echo "copying events/materials/ in place..." >> $crondir/lessoften.log |
| 27 |
|
|
install -d -m 2775 -g debwww $webdir/events/materials |
| 28 |
|
|
cp -a $webtopdir/events-materials/* $webdir/events/materials/ |
| 29 |
|
|
|
| 30 |
|
|
#echo "rebuilding the potato release docs..." >> $crondir/lessoften.log |
| 31 |
|
|
#$webtopdir/bf/potato/cvsbuild >> $crondir/lessoften.log |
| 32 |
|
|
#echo "copying potato release docs in place..." >> $crondir/lessoften.log |
| 33 |
|
|
## -f because of symlinks |
| 34 |
|
|
#cp -af $webtopdir/bf/potato/boot-floppies/documentation/arch/* $webdir/releases/potato/ |
| 35 |
|
|
|
| 36 |
|
|
echo "rebuilding the woody release docs..." >> $crondir/lessoften.log |
| 37 |
|
|
$webtopdir/bf/woody/cvsbuild >> $crondir/lessoften.log |
| 38 |
|
|
echo "copying woody release docs in place..." >> $crondir/lessoften.log |
| 39 |
|
|
# -f because of symlinks |
| 40 |
|
|
cp -af $webtopdir/bf/woody/boot-floppies/documentation/arch/* $webdir/releases/woody/ |
| 41 |
|
|
|
| 42 |
|
|
# previously in parts/1l10ndata, from bouz |
| 43 |
|
|
cd $crondir/datafiles/ |
| 44 |
|
|
echo "updating the database file used to display l10n stats..." >> $crondir/lessoften.log |
| 45 |
|
|
wget -q -N http://ftp-master.debian.org/~barbier/l10n/material/data/unstable.gz || { echo "couldn't fetch data/unstable on ftp-master!"; exit 1; } |
| 46 |
|
|
gunzip -c -f unstable.gz > unstable.ftp-master |
| 47 |
|
|
ln -sf $crondir/datafiles/unstable.ftp-master $webtopdir/webwml/english/international/l10n/data/unstable.ftp-master |
| 48 |
|
|
|
| 49 |
|
|
echo "updating the non-US database file used to display l10n stats..." >> $crondir/lessoften.log |
| 50 |
|
|
wget -q -N http://non-us.debian.org/~barbier/l10n/material/data/unstable.gz || { echo "couldn't fetch data/unstable on non-us!"; exit 1; } |
| 51 |
|
|
gunzip -c -f unstable.gz > unstable.non-US |
| 52 |
|
|
ln -sf $crondir/datafiles/unstable.non-US $webtopdir/webwml/english/international/l10n/data/unstable.non-US |
| 53 |
|
|
|
| 54 |
|
|
# cleanup |
| 55 |
|
|
rm -f unstable.gz |
| 56 |
|
|
|
| 57 |
|
|
echo "extracting the list of languages..." >> $crondir/lessoften.log |
| 58 |
|
|
cd $webtopdir/webwml/english/international/l10n |
| 59 |
|
|
./scripts/list-languages.pl data/unstable.ftp-master data/unstable.non-US > data/langs |
| 60 |
debwww |
1.2 |
|
| 61 |
|
|
# the below scripts will echo what they are doing themselves |
| 62 |
|
|
$crondir/people_scripts/update.packages+sources >> $crondir/lessoften.log |
| 63 |
|
|
$crondir/people_scripts/update.people.html >> $crondir/lessoften.log |
| 64 |
joy |
1.1 |
|
| 65 |
|
|
echo " ** lessoften cron job done *** " >> $crondir/lessoften.log |