From 86b3d7c0cdff042fd33e7705e6ef756415b86bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Tue, 24 Nov 2015 10:28:21 -0300 Subject: prevent duplicate repos from locking themselves --- db-update | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db-update b/db-update index 4830791..a1552c0 100755 --- a/db-update +++ b/db-update @@ -9,7 +9,7 @@ if [ $# -ge 1 ]; then fi # Find repos with packages to release -staging_repos=($(find "${STAGING}" -mindepth 1 -type f -name "*${PKGEXT}" -printf '%h\n' | sort -u)) +staging_repos=($(find "${STAGING}" -mindepth 1 -maxdepth 3 -type f -name "*${PKGEXT}" -printf '%h\n' | sort -u)) if [ $? -ge 1 ]; then die "Could not read %s" "${STAGING}" fi @@ -20,6 +20,7 @@ for staging_repo in "${staging_repos[@]##*/}"; do repos+=("${staging_repo}") fi done +repos=($(echo "${repos[@]}" | tr " " "\n" | sort -u)) # TODO: this might lock too much (architectures) for repo in "${repos[@]}"; do -- cgit v1.2.3