From a9fa2c166a04b682ef7a64cf86e2a61f51f2526d Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sat, 13 Jun 2015 14:56:04 +0200 Subject: [PATCH] autodecruft: Make function look a bit nicer. --- config/debian/dinstall.functions | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 281d4287..33931b2b 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -109,14 +109,15 @@ function dominate() { function autocruft() { log "Check for obsolete binary packages" - suites=${1:-"unstable experimental"} + local suites=${1:-"unstable experimental"} # Initially only run with -n and output into a file, to check. - dstamp=$(date -u +"%Y-%m-%d_%H:%M") - echo "Report for ${dstamp}" > $webdir/auto-cruft-report_${dstamp}.txt + local dstamp=$(date -u +"%Y-%m-%d_%H:%M") + local report=${webdir}/auto-cruft-report_${dstamp}.txt + echo "Report for ${dstamp}" > ${report} for suite in ${suites}; do - dak auto-decruft -n -s ${suite} >> $webdir/auto-cruft-report_${dstamp}.txt + dak auto-decruft -n -s ${suite} >> ${report} done - cat $webdir/auto-cruft-report_${dstamp}.txt | mail -a "X-Debian: DAK" -e -s "Debian archive AUTOMATIC cruft report for ${dstamp}" -a "From: Debian FTP Masters " -c niels@thykier.net ftpmaster@ftp-master.debian.org + cat ${report} | mail -a "X-Debian: DAK" -e -s "Debian archive AUTOMATIC cruft report for ${dstamp}" -a "From: Debian FTP Masters " -c niels@thykier.net ftpmaster@ftp-master.debian.org } function fingerprints() { -- 2.39.5