summaryrefslogtreecommitdiffstats
path: root/cron-jobs/ftpdir-cleanup
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-11-01 12:11:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-11-01 12:11:50 +0100
commit278d07fb2b72951e1f03154df55bb833cc38d29b (patch)
tree2dcf12dddcb4465402ff3266cd320437a683a09c /cron-jobs/ftpdir-cleanup
parent0b43e8cdee1ee46ea79e4d089136e76e767b4d5b (diff)
downloaddbscripts-278d07fb2b72951e1f03154df55bb833cc38d29b.tar.gz
dbscripts-278d07fb2b72951e1f03154df55bb833cc38d29b.tar.xz
cron-jobs: Fix issues with empty repositories
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-xcron-jobs/ftpdir-cleanup2
1 files changed, 1 insertions, 1 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 8f5cb3c..2683676 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -64,7 +64,7 @@ done
# get a list of all available packages in the pacakge pool
find "$FTP_BASE/${PKGPOOL}" -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/pool"
# create a list of packages in our db
-cat "${WORKDIR}/db-"* | sort -u > "${WORKDIR}/db"
+find "${WORKDIR}" -maxdepth 1 -type f -name 'db-*' -exec cat {} \; | sort -u > "${WORKDIR}/db"
old_pkgs=($(comm -23 "${WORKDIR}/pool" "${WORKDIR}/db"))
if [ ${#old_pkgs[@]} -ge 1 ]; then