summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-08-12 02:37:50 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-08-12 02:37:50 -0300
commit7d6595c750903114740c7ab726cd89cb73d6c3a9 (patch)
tree64fde5cd45e98ddcabe9adce35b852611091c0fa /cron-jobs
parentd2f65c340f890050c99371e203288afea03d125b (diff)
Fixed unexistent REPOS array and skip removal when the ABS tree is empty.
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/repo-sanity-check8
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" | \