weekly.functions 696 B

12345678910111213141516171819202122232425262728
  1. # -*- mode:sh -*-
  2. function purgeempty() {
  3. log "Purging empty directories"
  4. local archiveroot
  5. for archive in "${public_archives[@]}"; do
  6. log "... archive: ${archive}"
  7. archiveroot="$(get_archiveroot "${archive}")"
  8. # FIXME: double find
  9. if [ ! -z "$(find ${archiveroot}/pool/ -type d -empty)" ]; then
  10. find ${archiveroot}/pool/ -type d -empty | xargs rmdir;
  11. fi
  12. done
  13. }
  14. function fixsymlinks() {
  15. log "Fixing symlinks"
  16. local archiveroot
  17. for archive in "${public_archives[@]}"; do
  18. log "... archive: ${archive}"
  19. archiveroot="$(get_archiveroot "${archive}")"
  20. symlinks -d -r ${archiveroot}
  21. done
  22. }