/[webwml]/cron/lessoften
ViewVC logotype

Diff of /cron/lessoften

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by kraai, Wed Jan 25 13:08:29 2006 UTC revision 1.29 by kraai, Fri May 1 13:59:25 2009 UTC
# Line 7  umask 002 Line 7  umask 002
7    
8  # locking  # locking
9  if lockfile -! -l 43200 -r 0 "$crondir/lessoften.lock"; then  if lockfile -! -l 43200 -r 0 "$crondir/lessoften.lock"; then
10    echo `hostname` is unable to start update, lock file exists. >> $crondir/lessoften.log    echo `hostname` is unable to start update, lock file exists. >> $crondir/log/lessoften.log
11    exit 1    exit 1
12  fi  fi
13  trap "rm -f $crondir/lessoften.lock" exit  trap "rm -f $crondir/lessoften.lock" exit
14    
15  # rotate the previous log file  # rotate the previous log file
16  savelog $crondir/lessoften.log &> /dev/null  savelog $crondir/log/lessoften.log > /dev/null
17    
18  echo "starting the lessoften cron job at `date`" > $crondir/lessoften.log  echo "starting the lessoften cron job at `date`" > $crondir/log/lessoften.log
19    
20  echo "creating mailing-lists.txt..." >> $crondir/lessoften.log  echo "creating mailing-lists.txt..." >> $crondir/log/lessoften.log
21  make -s -C $webtopdir/webwml/english/MailingLists mailing-lists.txt  make -s -C $webtopdir/webwml/english/MailingLists mailing-lists.txt
22  install -m 664 -g debwww \  install -m 664 -g debwww \
23    $webtopdir/webwml/english/MailingLists/mailing-lists.txt \    $webtopdir/webwml/english/MailingLists/mailing-lists.txt \
24    $webdir/misc/mailing-lists.txt    $webdir/misc/mailing-lists.txt
25    
26  echo "copying events/materials/ in place..." >> $crondir/lessoften.log  echo "copying events/materials/ in place..." >> $crondir/log/lessoften.log
27  install -d -m 2775 -g debwww $webdir/events/materials  install -d -m 2775 -g debwww $webdir/events/materials
28  cp -a $webtopdir/events-materials/* $webdir/events/materials/  cp -a $webtopdir/events-materials/* $webdir/events/materials/
29    
30  # until we can actually build it on the server  # build installation guide for etch/lenny
31  echo "copying sarge installmanual in place..." >> $crondir/lessoften.log  cd $crondir/tmp
32  cp -a $webtopdir/installmanual/sarge/* $webdir/releases/sarge/  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  # previously in parts/1l10ndata, from bouz
51  [ -d $crondir/datafiles ] || mkdir -p $crondir/datafiles  [ -d $crondir/datafiles ] || mkdir -p $crondir/datafiles
52  cd $crondir/datafiles  cd $crondir/datafiles
53  echo "updating the database file used to display l10n stats..." >> $crondir/lessoften.log  echo "updating the database file used to display l10n stats..." >> $crondir/log/lessoften.log
54  wget -q -N http://people.debian.org/~pmachard/l10n/material/data/unstable.gz || { echo "couldn't fetch data/unstable!" >> $crondir/lessoften.log; exit 1; }  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  gunzip -c -f unstable.gz > unstable.gluck
56  ln -sf $crondir/datafiles/unstable.gluck $webtopdir/webwml/english/international/l10n/data/unstable.gluck  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  wget -q -N http://popcon.debian.org/source/by_inst && ln -sf $crondir/datafiles/by_inst $webtopdir/webwml/english/international/l10n/data/popcon
# Line 43  wget -q -N http://popcon.debian.org/sour Line 59  wget -q -N http://popcon.debian.org/sour
59  # cleanup  # cleanup
60  rm -f unstable.gz  rm -f unstable.gz
61    
62  echo "extracting the list of languages..." >> $crondir/lessoften.log  echo "extracting the list of languages..." >> $crondir/log/lessoften.log
63  cd $webtopdir/webwml/english/international/l10n  cd $webtopdir/webwml/english/international/l10n
64  ./scripts/list-languages.pl data/unstable.gluck > data/langs  ./scripts/list-languages.pl data/unstable.gluck > data/langs
65    
66  echo "cleaning up obsolete templates translation information" >> $crondir/lessoften.log  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  cd $webdir/international/l10n
75  find po po-debconf templates -type f -mtime +30 -exec rm -f \{\} \;  find po po-debconf templates -type f -mtime +30 -exec rm -f \{\} \;
76    
77  # the below scripts will echo what they are doing themselves  # the below scripts will echo what they are doing themselves
78  $crondir/people_scripts/update.packages+sources >> $crondir/lessoften.log  $crondir/people_scripts/update.packages+sources >> $crondir/log/lessoften.log
79  $crondir/people_scripts/update.people.html >> $crondir/lessoften.log  $crondir/people_scripts/update.people.html >> $crondir/log/lessoften.log
80    
81  echo " ** lessoften cron job done *** " >> $crondir/lessoften.log  echo " ** lessoften cron job done *** " >> $crondir/log/lessoften.log

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.5