X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=config%2Fdebian-security%2Fcron.unchecked;h=ea8f505686027225bdf33baa36f8bdb22c41f17f;hb=205d7ee9627d28d924fb6b8765de950f46acdb2e;hp=5b2800865c7daa1091e20cc5c73cc16cf9f387b9;hpb=17cec6a95a357324d0292155242310aed6757ebf;p=dak.git diff --git a/config/debian-security/cron.unchecked b/config/debian-security/cron.unchecked index 5b280086..ea8f5056 100755 --- a/config/debian-security/cron.unchecked +++ b/config/debian-security/cron.unchecked @@ -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