| 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 |
joy |
1.25 |
echo `hostname` is unable to start update, lock file exists. >> $crondir/log/lessoften.log |
| 11 |
joy |
1.1 |
exit 1 |
| 12 |
|
|
fi |
| 13 |
|
|
trap "rm -f $crondir/lessoften.lock" exit |
| 14 |
|
|
|
| 15 |
|
|
# rotate the previous log file |
| 16 |
joy |
1.25 |
savelog $crondir/log/lessoften.log &> /dev/null |
| 17 |
joy |
1.1 |
|
| 18 |
joy |
1.25 |
echo "starting the lessoften cron job at `date`" > $crondir/log/lessoften.log |
| 19 |
joy |
1.1 |
|
| 20 |
joy |
1.25 |
echo "creating mailing-lists.txt..." >> $crondir/log/lessoften.log |
| 21 |
joy |
1.1 |
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 |
joy |
1.25 |
echo "copying events/materials/ in place..." >> $crondir/log/lessoften.log |
| 27 |
joy |
1.1 |
install -d -m 2775 -g debwww $webdir/events/materials |
| 28 |
|
|
cp -a $webtopdir/events-materials/* $webdir/events/materials/ |
| 29 |
|
|
|
| 30 |
djpig |
1.23 |
# build installation guide for etch/lenny |
| 31 |
djpig |
1.19 |
cd $crondir/tmp |
| 32 |
|
|
igdsc=`ls -t1 $ftpdir/pool/main/i/installation-guide/installation-guide_*.dsc | head -1` |
| 33 |
djpig |
1.20 |
igdir=`basename "$igdsc" | |
| 34 |
|
|
sed -e 's/installation-guide_/installation-guide-/' -e 's/\.dsc//'` |
| 35 |
djpig |
1.24 |
for dist in lenny; do |
| 36 |
djpig |
1.23 |
if [ "$igdsc" -nt $webtopdir/installmanual/$dist.log ]; then |
| 37 |
joy |
1.25 |
echo "extracting installation-guide source..." >> $crondir/log/lessoften.log |
| 38 |
djpig |
1.23 |
[ -d "$igdir" ] && rm -fr "$igdir" |
| 39 |
joy |
1.25 |
dpkg-source -sn -x "$igdsc" >> $crondir/log/lessoften.log |
| 40 |
djpig |
1.23 |
if [ -d "$igdir" ]; then |
| 41 |
joy |
1.25 |
echo "building installation-guide for $dist..." >> $crondir/log/lessoften.log |
| 42 |
djpig |
1.23 |
cd $igdir/build && |
| 43 |
|
|
manual_release=$dist destination=$webtopdir/installmanual/$dist/ ./buildweb.sh > $webtopdir/installmanual/$dist.log 2>&1 |
| 44 |
|
|
fi |
| 45 |
|
|
else |
| 46 |
joy |
1.25 |
echo no new installation-guide for $dist, skipping build >> $crondir/log/lessoften.log |
| 47 |
djpig |
1.19 |
fi |
| 48 |
djpig |
1.23 |
done |
| 49 |
djpig |
1.19 |
|
| 50 |
djpig |
1.23 |
for dist in sarge etch lenny; do |
| 51 |
joy |
1.25 |
echo "copying $dist installmanual in place..." >> $crondir/log/lessoften.log |
| 52 |
djpig |
1.19 |
cp -a $webtopdir/installmanual/$dist/* $webdir/releases/$dist/ |
| 53 |
|
|
done |
| 54 |
djpig |
1.15 |
|
| 55 |
joy |
1.1 |
# previously in parts/1l10ndata, from bouz |
| 56 |
djpig |
1.16 |
[ -d $crondir/datafiles ] || mkdir -p $crondir/datafiles |
| 57 |
|
|
cd $crondir/datafiles |
| 58 |
joy |
1.25 |
echo "updating the database file used to display l10n stats..." >> $crondir/log/lessoften.log |
| 59 |
|
|
wget -q -N http://i18n.debian.net/material/data/unstable.gz || { echo "couldn't fetch data/unstable!" >> $crondir/log/lessoften.log; exit 1; } |
| 60 |
djpig |
1.22 |
gunzip -c -f unstable.gz > unstable.gluck |
| 61 |
|
|
ln -sf $crondir/datafiles/unstable.gluck $webtopdir/webwml/english/international/l10n/data/unstable.gluck |
| 62 |
kraai |
1.18 |
wget -q -N http://popcon.debian.org/source/by_inst && ln -sf $crondir/datafiles/by_inst $webtopdir/webwml/english/international/l10n/data/popcon |
| 63 |
joy |
1.1 |
|
| 64 |
|
|
# cleanup |
| 65 |
|
|
rm -f unstable.gz |
| 66 |
|
|
|
| 67 |
joy |
1.25 |
echo "extracting the list of languages..." >> $crondir/log/lessoften.log |
| 68 |
joy |
1.1 |
cd $webtopdir/webwml/english/international/l10n |
| 69 |
kraai |
1.5 |
./scripts/list-languages.pl data/unstable.gluck > data/langs |
| 70 |
debwww |
1.2 |
|
| 71 |
joy |
1.25 |
echo "cleaning up obsolete templates translation information" >> $crondir/log/lessoften.log |
| 72 |
kraai |
1.17 |
cd $webdir/international/l10n |
| 73 |
|
|
find po po-debconf templates -type f -mtime +30 -exec rm -f \{\} \; |
| 74 |
|
|
|
| 75 |
debwww |
1.2 |
# the below scripts will echo what they are doing themselves |
| 76 |
joy |
1.25 |
$crondir/people_scripts/update.packages+sources >> $crondir/log/lessoften.log |
| 77 |
|
|
$crondir/people_scripts/update.people.html >> $crondir/log/lessoften.log |
| 78 |
joy |
1.1 |
|
| 79 |
joy |
1.25 |
echo " ** lessoften cron job done *** " >> $crondir/log/lessoften.log |