summaryrefslogtreecommitdiff
path: root/db-cleanup
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-11-23 13:43:04 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-11-23 13:43:04 -0300
commit4a31562deb872713acae3d17f0f638edd0c4158e (patch)
treee92cbb514fe405056d8ecbc1f6a13bad1c90279a /db-cleanup
parentee7bba114de818df23196edb7d0d785217b7a332 (diff)
Fixed errors in logic
Diffstat (limited to 'db-cleanup')
-rwxr-xr-xdb-cleanup8
1 files changed, 4 insertions, 4 deletions
diff --git a/db-cleanup b/db-cleanup
index b12e9c1..72790f1 100755
--- a/db-cleanup
+++ b/db-cleanup
@@ -28,8 +28,8 @@ trap 'trap_exit "$(gettext "An unknown error has occurred. Exiting...")"' ERR
${CLEANUP_DRYRUN} && EXTRAFLAGS+=" --dry-run"
-for _repo in ${ARCHREPOS[@]}; do
- for _arch in ${ARCHARCHES[@]}; do
+for _repo in ${PKGREPOS[@]}; do
+ for _arch in ${ARCHES[@]}; do
msg "Getting ${_repo}-${_arch} database"
dbfile="${FTP_BASE}/${_repo}/os/${_arch}/${_repo}${DBEXT}"
@@ -43,7 +43,7 @@ for _repo in ${ARCHREPOS[@]}; do
bsdtar tf "${dbfile}" | \
cut -d'/' -f1 | \
sort -u | \
- sed "s|$|*|" >> /tmp/$0.$PID.filter
+ sed "s|$|*|" >> /tmp/$0.$$.filter
done
done
@@ -54,7 +54,7 @@ for POOL in ${PKGPOOLS[@]} ${SRCPOOLS[@]}; do
msg2 "${POOL}"
rsync ${EXTRAFLAGS} -va --delete-excluded \
- --include-from="${dbfile}" \
+ --include-from="/tmp/$0.$$.filter" \
--exclude="*" \
${FTP_BASE}/${POOL}/ \
${FTP_BASE}/${POOL}/