]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian-security/cron.unchecked
updated for new version
[dak.git] / config / debian-security / cron.unchecked
index 5b2800865c7daa1091e20cc5c73cc16cf9f387b9..ea8f505686027225bdf33baa36f8bdb22c41f17f 100755 (executable)
@@ -1,22 +1,47 @@
-#! /bin/sh
+#! /bin/bash
 
 set -e
-export SCRIPTVARS=/org/security.debian.org/dak/config/debian-security/vars
+set -u
+
+export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars
 . $SCRIPTVARS
 
-cd $unchecked
+# And use one locale, no matter what the caller has set
+export LANG=C
+export LC_ALL=C
 
-changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
 report=$queuedir/REPORT
+reportdis=$queuedir/REPORT.disembargo
 timestamp=$(date "+%Y-%m-%d %H:%M")
+doanything=false
 
-if [ -z "$changes" ]; then
-  echo "$timestamp": Nothing to do >> $report
-  exit 0;
-fi;
+cd $newstage
+changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
+if [ -n "$changes" ]; then
+    echo "$timestamp": ${changes:-"Nothing to do in newstage"}  >> $report
+    dak process-upload -a -d "$newstage" >> $report
+fi
+
+cd $unchecked
+changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
+if [ -n "$changes" ]; then
+    doanything=true
+    echo "$timestamp": ${changes:-"Nothing to do in unchecked"}  >> $report
+    dak process-upload -a -d "$unchecked" >> $report
+fi
+
+cd $disembargo
+changes=$(find . -maxdepth 1 -mindepth 1 -type f -name \*.changes | sed -e "s,./,," | xargs)
+
+if [ -n "$changes" ]; then
+    doanything=true
+    echo "$timestamp": ${changes:-"Nothing to do in disembargo"}  >> $reportdis
+    dak process-upload -a -d "$disembargo" >> $reportdis
+fi
 
-echo "$timestamp": "$changes"  >> $report
-dak process-unchecked -a $changes >> $report
-echo "--" >> $report
+if ! $doanything; then
+  echo "$timestamp": Nothing to do >> $report
+  exit 0
+fi
 
-sh $masterdir/cron.buildd-security
+$masterdir/cron.buildd