diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-08-12 02:37:50 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-08-12 02:37:50 -0300 |
commit | 7d6595c750903114740c7ab726cd89cb73d6c3a9 (patch) | |
tree | 64fde5cd45e98ddcabe9adce35b852611091c0fa /cron-jobs | |
parent | d2f65c340f890050c99371e203288afea03d125b (diff) |
Fixed unexistent REPOS array and skip removal when the ABS tree is empty.
Diffstat (limited to 'cron-jobs')
-rwxr-xr-x | cron-jobs/repo-sanity-check | 8 |
1 files changed, 7 insertions, 1 deletions
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" | \ |