summaryrefslogtreecommitdiffstats
path: root/cron-jobs/sourceballs
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/sourceballs
parent0b43e8cdee1ee46ea79e4d089136e76e767b4d5b (diff)
downloaddbscripts-278d07fb2b72951e1f03154df55bb833cc38d29b.tar.gz
dbscripts-278d07fb2b72951e1f03154df55bb833cc38d29b.tar.xz
cron-jobs: Fix issues with empty repositories
Diffstat (limited to 'cron-jobs/sourceballs')
-rwxr-xr-xcron-jobs/sourceballs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index be66e99..4126c37 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -117,8 +117,8 @@ for repo in ${PKGREPOS[@]}; do
done
# Cleanup old source packages
-cat "${WORKDIR}/expected-src-pkgs" | sort -u > "${WORKDIR}/expected-src-pkgs.sort"
-cat "${WORKDIR}/available-src-pkgs" | sort -u > "${WORKDIR}/available-src-pkgs.sort"
+find "${WORKDIR}" -maxdepth 1 -type f -name 'expected-src-pkgs' -exec cat {} \; | sort -u > "${WORKDIR}/expected-src-pkgs.sort"
+find "${WORKDIR}" -maxdepth 1 -type f -name 'available-src-pkgs' -exec cat {} \; | sort -u > "${WORKDIR}/available-src-pkgs.sort"
old_pkgs=($(comm -23 "${WORKDIR}/available-src-pkgs.sort" "${WORKDIR}/expected-src-pkgs.sort"))
if [ ${#old_pkgs[@]} -ge 1 ]; then