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/backports-master.debian.org/dak/config/backports/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/"
29 if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then
30 find $ftpdir/pool/ -type d -empty | xargs rmdir;
33 # Clean up apt-ftparchive's databases
35 #echo "Cleanup apt-ftparchive's database"
36 #apt-ftparchive -q clean apt.conf
38 echo "Fixing symlinks in $ftpdir"
39 symlinks -d -r $ftpdir
41 echo "Finally, all is done, compressing logfile"
47 ################################################################################