3 # Run once a week via cron, out of dak's crontab.
7 # ERR traps should be inherited from functions too. (And command
8 # substitutions and subshells and whatnot, but for us the functions is
9 # the important part here)
11 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
15 NOW=`date "+%Y.%m.%d-%H:%M:%S"`
16 LOGFILE="$logdir/weekly_${NOW}.log"
17 exec > "$LOGFILE" 2>&1
25 ################################################################################
27 # Purge empty directories
28 echo "Purging empty directories in $ftpdir/pool/"
30 if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then
31 find $ftpdir/pool/ -type d -empty | xargs rmdir;
35 echo "Splitting queue/done"
36 dak split-done > /dev/null
38 # Do git cleanup stuff
39 echo "Doing git stuff"
40 cd /srv/ftp.debian.org/git/dak.git
42 git update-server-info
43 # now workaround a git bug not honoring the setup in logs/*
44 # (fix in development, but until it reached backports.org.......)
47 # Clean up apt-ftparchive's databases
49 echo "Cleanup apt-ftparchive's database"
50 apt-ftparchive -q clean apt.conf
51 apt-ftparchive -q clean apt.conf.buildd
53 # Update wanna-build dump
54 echo "Update wanna-build database dump"
55 $base/dak/scripts/nfu/get-w-b-db
57 echo "Fixing symlinks in $ftpdir"
58 symlinks -d -r $ftpdir
60 echo "Finally, all is done, compressing logfile"
66 ################################################################################