6 # ERR traps should be inherited from functions too. (And command
7 # substitutions and subshells and whatnot, but for us the functions is
8 # the important part here)
10 export SCRIPTVARS=/srv/backports-master.debian.org/dak/config/backports/vars
14 NOW=`date "+%Y.%m.%d-%H:%M:%S"`
15 LOGFILE="$logdir/weekly_${NOW}.log"
16 exec > "$LOGFILE" 2>&1
24 ################################################################################
26 # Purge empty directories
27 echo "Purging empty directories in $ftpdir/pool/"
28 if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then
29 find $ftpdir/pool/ -type d -empty | xargs rmdir;
32 # Clean up apt-ftparchive's databases
34 echo "Splitting queue/done"
37 # Clean up apt-ftparchive's databases
39 #echo "Cleanup apt-ftparchive's database"
40 #apt-ftparchive -q clean apt.conf
42 echo "Fixing symlinks in $ftpdir"
43 symlinks -d -r $ftpdir
45 echo "Finally, all is done, compressing logfile"
51 ################################################################################