X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fweekly.functions;h=893813dc7da3f8ee5824f6e0358a22ea239ab4be;hb=9639afdb34ea7c5fdaf62e05a78ca0aab288f6de;hp=55a7f23fa066700219a3a06da7a1bb79b2f62e54;hpb=460b431da971dc01d047dcefd2e146c6d42c0195;p=dak.git diff --git a/config/debian/weekly.functions b/config/debian/weekly.functions index 55a7f23f..893813dc 100644 --- a/config/debian/weekly.functions +++ b/config/debian/weekly.functions @@ -1,11 +1,18 @@ # -*- mode:sh -*- function purgeempty() { - log "Purging empty directories in $ftpdir/pool/" + log "Purging empty directories" + local archiveroot - if [ ! -z "$(find $ftpdir/pool/ -type d -empty)" ]; then - find $ftpdir/pool/ -type d -empty | xargs rmdir; - fi + for archive in "${public_archives[@]}"; do + log "... archive: ${archive}" + archiveroot="$(get_archiveroot "${archive}")" + + # FIXME: double find + if [ ! -z "$(find ${archiveroot}/pool/ -type d -empty)" ]; then + find ${archiveroot}/pool/ -type d -empty | xargs rmdir; + fi + done } function gitcleanup() { @@ -18,7 +25,13 @@ function gitcleanup() { chmod -R g+w logs/ } -function symlinks() { - log "Fixing symlinks in $ftpdir" - symlinks -d -r $ftpdir +function fixsymlinks() { + log "Fixing symlinks" + local archiveroot + + for archive in "${public_archives[@]}"; do + log "... archive: ${archive}" + archiveroot="$(get_archiveroot "${archive}")" + symlinks -d -r ${archiveroot} + done }