diff options
-rwxr-xr-x | cron-jobs/ftpdir-cleanup | 5 | ||||
-rwxr-xr-x | misc-scripts/ftpdir-cleanup | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index 66733f0..546afd9 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -37,9 +37,9 @@ for repo in $repos; do done to_cleanup="" -for _arch in ${ARCHES[@]}; do +for _arch in any ${ARCHES[@]}; do poolpath="$FTP_BASE/$(get_pkgpool_for_host)/$_arch/" - cd $poolpath + 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)" @@ -47,6 +47,7 @@ for _arch in ${ARCHES[@]}; do to_cleanup="$to_cleanup $poolpath/$pkg" fi done + popd >/dev/null done if [ -n "$to_cleanup" ]; then diff --git a/misc-scripts/ftpdir-cleanup b/misc-scripts/ftpdir-cleanup index c9a232d..ac17a8d 100755 --- a/misc-scripts/ftpdir-cleanup +++ b/misc-scripts/ftpdir-cleanup @@ -60,9 +60,10 @@ for arch in ${ARCHES[@]}; do if [ ! -f "$ftppath/$reponame$DBEXT" ]; then echo "" - echo "ERROR: The file \"$ftppath/$reponame$DBEXT\" could not be found, aborting." + echo "WARNING: The file \"$ftppath/$reponame$DBEXT\" could not be found, skipping." echo "" - exit 1 + repo_unlock $reponame $arch + continue fi if ! bsdtar xf "$ftppath/$reponame$DBEXT"; then |