#!/bin/sh
#
# Run once a week via cron, out of katie's crontab.

set -e
export SCRIPTVARS=/org/ftp.debian.org/katie/vars
. $SCRIPTVARS

################################################################################

# Purge empty directories

if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then
   find $ftpdir/pool/ -type d -empty | xargs rmdir;
fi

# Clean up apt-ftparchive's databases

cd $masterdir
apt-ftparchive -q clean apt.conf
apt-ftparchive -q clean apt.conf.buildd

################################################################################