From 7d6595c750903114740c7ab726cd89cb73d6c3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Fri, 12 Aug 2011 02:37:50 -0300 Subject: Fixed unexistent REPOS array and skip removal when the ABS tree is empty. --- cron-jobs/repo-sanity-check | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cron-jobs') diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check index 690a9f8..92b26ae 100755 --- a/cron-jobs/repo-sanity-check +++ b/cron-jobs/repo-sanity-check @@ -5,7 +5,7 @@ . "$(dirname $0)/../config" # Traverse all repos -for _repo in ${REPOS[@]}; do +for _repo in ${PKGREPOS[@]}; do # Find all pkgnames on this repo's abs on_abs=($( @@ -27,6 +27,12 @@ for _repo in ${REPOS[@]}; do done )) +# quit if abs is empty + if [ ${#on_abs[*]} -eq 0 ]; then + warning "[${_repo}]'s ABS tree is empty, skipping" + break + fi + # Find all pkgnames on repos on_repo=($( find ${FTP_BASE}/${_repo} -name "*.pkg.tar.?z" -printf "%f\n" | \ -- cgit v1.2.3