]> git.decadent.org.uk Git - dak.git/blob - config/debian-security/cron.unchecked
updated for new version
[dak.git] / config / debian-security / cron.unchecked
1 #! /bin/bash
2
3 set -e
4 set -u
5
6 export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars
7 . $SCRIPTVARS
8
9 # And use one locale, no matter what the caller has set
10 export LANG=C
11 export LC_ALL=C
12
13 report=$queuedir/REPORT
14 reportdis=$queuedir/REPORT.disembargo
15 timestamp=$(date "+%Y-%m-%d %H:%M")
16 doanything=false
17
18 cd $newstage
19 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
20 if [ -n "$changes" ]; then
21     echo "$timestamp": ${changes:-"Nothing to do in newstage"}  >> $report
22     dak process-upload -a -d "$newstage" >> $report
23 fi
24
25 cd $unchecked
26 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
27 if [ -n "$changes" ]; then
28     doanything=true
29     echo "$timestamp": ${changes:-"Nothing to do in unchecked"}  >> $report
30     dak process-upload -a -d "$unchecked" >> $report
31 fi
32
33 cd $disembargo
34 changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
35
36 if [ -n "$changes" ]; then
37     doanything=true
38     echo "$timestamp": ${changes:-"Nothing to do in disembargo"}  >> $reportdis
39     dak process-upload -a -d "$disembargo" >> $reportdis
40 fi
41
42 if ! $doanything; then
43   echo "$timestamp": Nothing to do >> $report
44   exit 0
45 fi
46
47 $masterdir/cron.buildd