X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcron.dinstall;h=5f17739a27e283d620e86d2e50fdbbd144f534d8;hb=ec2548b155c22b68b7340b25087ca71defd64c21;hp=708f49bb9c206506652ffe5e5ed9d380eae04dd8;hpb=e8886b409b2824c6dfd2eb806c3a2f59c335642b;p=dak.git diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 708f49bb..5f17739a 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -87,7 +87,7 @@ function pgdakdev() { echo "drop database projectb" | psql -p 5433 template1 cat currentall | psql -p 5433 template1 createdb -p 5433 -T template0 projectb - fgrep -v '\connect' `cat current` | psql -p 5433 projectb + fgrep -v '\connect' current | psql -p 5433 projectb } # Updating various files @@ -340,20 +340,29 @@ function savetimestamp() { echo ${NOW} > "${dbdir}/dinstallstart" } +function maillogfile() { + cat "$LOGFILE" | mail -s "Log for dinstall run of ${NOW}" cron@ftp-master.debian.org +} + function renamelogfile() { - if [ -f "${dbdir}/dinstallstart" ]; then - RENAMETO=$(cat "${dbdir}/dinstallstart") - mv "$LOGFILE" "$logdir/dinstall_${RENAMETO}.log" - logstats "$logdir/dinstall_${RENAMETO}.log" - bzip2 -9 "$logdir/dinstall_${RENAMETO}.log" - else - error "Problem, I don't know when dinstall started, unable to do log statistics." - NOW=`date "+%Y.%m.%d-%H:%M:%S"` - mv "$LOGFILE" "$logdir/dinstall_${NOW}.log" - bzip2 -9 "$logdir/dinstall_${NOW}.log" - fi + if [ -f "${dbdir}/dinstallstart" ]; then + NOW=$(cat "${dbdir}/dinstallstart") + maillogfile + mv "$LOGFILE" "$logdir/dinstall_${NOW}.log" + logstats "$logdir/dinstall_${NOW}.log" + bzip2 -9 "$logdir/dinstall_${NOW}.log" + else + error "Problem, I don't know when dinstall started, unable to do log statistics." + NOW=`date "+%Y.%m.%d-%H:%M:%S"` + maillogfile + mv "$LOGFILE" "$logdir/dinstall_${NOW}.log" + bzip2 -9 "$logdir/dinstall_${NOW}.log" + fi } +function testingsourcelist() { + dak ls -s testing -f heidi -r .| egrep 'source$' > ${webdir}/testing.list +} ######################################################################## ######################################################################## @@ -710,7 +719,7 @@ GO=( FUNC="bts" TIME="" ARGS="" - ERR="" + ERR="false" ) stage $GO @@ -748,6 +757,13 @@ GO=( ) stage $GO +GO=( + FUNC="testingsourcelist" + TIME="" + ARGS="" + ERR="false" +) + rm -f ${LOCK_BRITNEY} GO=(