3 # Run once a week via cron, out of dak's crontab.
8 # ERR traps should be inherited from functions too. (And command
9 # substitutions and subshells and whatnot, but for us the functions is
10 # the important part here)
12 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
16 NOW=`date "+%Y.%m.%d-%H:%M:%S"`
17 LOGFILE="$logdir/weekly_${NOW}.log"
18 exec > "$LOGFILE" 2>&1
26 ################################################################################
28 # Purge empty directories
29 echo "Purging empty directories in $ftpdir/pool/"
31 if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then
32 find $ftpdir/pool/ -type d -empty | xargs rmdir;
35 # Do git cleanup stuff
36 echo "Doing git stuff"
37 cd /srv/ftp.debian.org/git/dak.git
39 git update-server-info
40 # now workaround a git bug not honoring the setup in logs/*
41 # (fix in development, but until it reached backports.org.......)
44 echo "Fixing symlinks in $ftpdir"
45 symlinks -d -r $ftpdir
47 echo "Finally, all is done, compressing logfile"
53 ################################################################################