/[webwml]/cron/lessoften
ViewVC logotype

Contents of /cron/lessoften

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.28 - (show annotations) (download)
Fri May 1 07:17:13 2009 UTC (4 years ago) by kraai
Branch: MAIN
Changes since 1.27: +2 -4 lines
Do not copy the sarge or etch installation guides, suggested by Frans
Pop.
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. >> $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 for dist in lenny; do
36 if [ "$igdsc" -nt $webtopdir/installmanual/$dist.log ]; then
37 echo "extracting installation-guide source..." >> $crondir/log/lessoften.log
38 [ -d "$igdir" ] && rm -fr "$igdir"
39 dpkg-source -sn -x "$igdsc" >> $crondir/log/lessoften.log
40 if [ -d "$igdir" ]; then
41 echo "building installation-guide for $dist..." >> $crondir/log/lessoften.log
42 cd $igdir/build &&
43 manual_release=$dist destination=$webtopdir/installmanual/$dist/ ./buildweb.sh > $webtopdir/installmanual/$dist.log 2>&1
44 fi
45 else
46 echo no new installation-guide for $dist, skipping build >> $crondir/log/lessoften.log
47 fi
48 done
49
50 echo "copying lenny installmanual in place..." >> $crondir/log/lessoften.log
51 cp -a $webtopdir/installmanual/lenny/* $webdir/releases/lenny/
52
53 # previously in parts/1l10ndata, from bouz
54 [ -d $crondir/datafiles ] || mkdir -p $crondir/datafiles
55 cd $crondir/datafiles
56 echo "updating the database file used to display l10n stats..." >> $crondir/log/lessoften.log
57 wget -q -N http://i18n.debian.net/material/data/unstable.gz || { echo "couldn't fetch data/unstable!" >> $crondir/log/lessoften.log; exit 1; }
58 gunzip -c -f unstable.gz > unstable.gluck
59 ln -sf $crondir/datafiles/unstable.gluck $webtopdir/webwml/english/international/l10n/data/unstable.gluck
60 wget -q -N http://popcon.debian.org/source/by_inst && ln -sf $crondir/datafiles/by_inst $webtopdir/webwml/english/international/l10n/data/popcon
61
62 # cleanup
63 rm -f unstable.gz
64
65 echo "extracting the list of languages..." >> $crondir/log/lessoften.log
66 cd $webtopdir/webwml/english/international/l10n
67 ./scripts/list-languages.pl data/unstable.gluck > data/langs
68
69 echo "updating the status files used to build l10n stats..." >> $crondir/log/lessoften.log
70 cd $crondir/datafiles
71 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; }
72 for status_file in status.*; do
73 ln -sf $crondir/datafiles/$status_file $webtopdir/webwml/english/international/l10n/data/$status_file
74 done
75
76 echo "cleaning up obsolete templates translation information" >> $crondir/log/lessoften.log
77 cd $webdir/international/l10n
78 find po po-debconf templates -type f -mtime +30 -exec rm -f \{\} \;
79
80 # the below scripts will echo what they are doing themselves
81 $crondir/people_scripts/update.packages+sources >> $crondir/log/lessoften.log
82 $crondir/people_scripts/update.people.html >> $crondir/log/lessoften.log
83
84 echo " ** lessoften cron job done *** " >> $crondir/log/lessoften.log

  ViewVC Help
Powered by ViewVC 1.1.5