diff options
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-x | cron-jobs/ftpdir-cleanup | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index f5e401a..7668ab5 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -17,18 +17,16 @@ for repo in $repos; do done to_cleanup="" -for _arch in any ${ARCHES[@]}; do - poolpath="$FTP_BASE/$(get_pkgpool_for_host)/$_arch/" - pushd $poolpath >/dev/null - for pkg in *$PKGEXT; do - [ -f "$pkg" ] || continue # in case we get a file named "*.pkg.tar.gz" - LINKS="$(/usr/bin/find $repopaths -type l -name "$pkg" 2>/dev/null)" - if [ -z "$LINKS" ]; then - to_cleanup="$to_cleanup $poolpath/$pkg" - fi - done - popd >/dev/null +poolpath="$FTP_BASE/$(get_pkgpool_for_host)/" +pushd $poolpath >/dev/null +for pkg in *$PKGEXT; do +[ -f "$pkg" ] || continue # in case we get a file named "*.pkg.tar.gz" +LINKS="$(/usr/bin/find $repopaths -type l -name "$pkg" 2>/dev/null)" +if [ -z "$LINKS" ]; then + to_cleanup="$to_cleanup $poolpath/$pkg" +fi done +popd >/dev/null if [ -n "$to_cleanup" ]; then echo " The following packages are no longer in any repo" |