/[webwml]/cron/lessoften
ViewVC logotype

Contents of /cron/lessoften

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.30 - (show annotations) (download)
Tue Dec 29 10:21:23 2009 UTC (3 years, 4 months ago) by rhonda-guest
Branch: MAIN
Changes since 1.29: +1 -1 lines
/org/ is dead, long live /srv/
1 #!/bin/bash
2
3 # see README for more information
4
5 umask 002
6 . /srv/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. >> $crondir/log/lessoften.log
11 exit 1
12 fi
13 trap "rm -f $crondir/lessoften.lock" exit
14
15 # rotate the previous log file
16 savelog $crondir/log/lessoften.log > /dev/null
17
18 echo "starting the lessoften cron job at `date`" > $crondir/log/lessoften.log
19
20 echo "creating mailing-lists.txt..." >> $crondir/log/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/log/lessoften.log
27 install -d -m 2775 -g debwww $webdir/events/materials
28 cp -a $webtopdir/events-materials/* $webdir/events/materials/
29
30 # build installation guide for etch/lenny
31 cd $crondir/tmp
32 igdsc=`ls -t1 $ftpdir/pool/main/i/installation-guide/installation-guide_*.dsc | head -1`
33 igdir=`basename "$igdsc" |
34 sed -e 's/installation-guide_/installation-guide-/' -e 's/\.dsc//'`
35 if [ "$igdsc" -nt $webtopdir/installmanual/squeeze.log -a "$igdsc" -nt $webtopdir/installmanual/lenny.log ]; then
36 echo "extracting installation-guide source..." >> $crondir/log/lessoften.log
37 [ -d "$igdir" ] && rm -fr "$igdir"
38 dpkg-source -sn -x "$igdsc" >> $crondir/log/lessoften.log
39 if [ -d "$igdir" ]; then
40 echo "building installation-guide for squeeze..." >> $crondir/log/lessoften.log
41 cd $igdir/build &&
42 manual_release=squeeze destination=$webtopdir/installmanual/squeeze/ ./buildweb.sh > $webtopdir/installmanual/squeeze.log 2>&1
43 fi
44 echo "copying squeeze installmanual in place..." >> $crondir/log/lessoften.log
45 cp -a $webtopdir/installmanual/squeeze/* $webdir/releases/squeeze/
46 else
47 echo no new installation-guide for squeeze, skipping build >> $crondir/log/lessoften.log
48 fi
49
50 # previously in parts/1l10ndata, from bouz
51 [ -d $crondir/datafiles ] || mkdir -p $crondir/datafiles
52 cd $crondir/datafiles
53 echo "updating the database file used to display l10n stats..." >> $crondir/log/lessoften.log
54 wget -q -N http://i18n.debian.net/material/data/unstable.gz || { echo "couldn't fetch data/unstable!" >> $crondir/log/lessoften.log; exit 1; }
55 gunzip -c -f unstable.gz > unstable.gluck
56 ln -sf $crondir/datafiles/unstable.gluck $webtopdir/webwml/english/international/l10n/data/unstable.gluck
57 wget -q -N http://popcon.debian.org/source/by_inst && ln -sf $crondir/datafiles/by_inst $webtopdir/webwml/english/international/l10n/data/popcon
58
59 # cleanup
60 rm -f unstable.gz
61
62 echo "extracting the list of languages..." >> $crondir/log/lessoften.log
63 cd $webtopdir/webwml/english/international/l10n
64 ./scripts/list-languages.pl data/unstable.gluck > data/langs
65
66 echo "updating the status files used to build l10n stats..." >> $crondir/log/lessoften.log
67 cd $crondir/datafiles
68 wget -erobots=off -q -N -nd -r -l1 --no-parent -A"status.*" http://i18n.debian.net/debian-l10n/status/ || { echo "couldn't fetch status.*!" >> $crondir/log/lessoften.log; exit 1; }
69 for status_file in status.*; do
70 ln -sf $crondir/datafiles/$status_file $webtopdir/webwml/english/international/l10n/data/$status_file
71 done
72
73 echo "cleaning up obsolete templates translation information" >> $crondir/log/lessoften.log
74 cd $webdir/international/l10n
75 find po po-debconf templates -type f -mtime +30 -exec rm -f \{\} \;
76
77 # the below scripts will echo what they are doing themselves
78 $crondir/people_scripts/update.packages+sources >> $crondir/log/lessoften.log
79 $crondir/people_scripts/update.people.html >> $crondir/log/lessoften.log
80
81 echo " ** lessoften cron job done *** " >> $crondir/log/lessoften.log

  ViewVC Help
Powered by ViewVC 1.1.5