From 7388855e8d4259a804efad13434ab502713c21c2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 5 Jul 2017 00:10:34 +0200 Subject: bin/common-functions: find_repository_with_commit now knows "build-support" --- bin/common-functions | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/bin/common-functions b/bin/common-functions index 8f223ca..9b89860 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -70,22 +70,24 @@ find_repository_with_commit() { find_git_repository_to_package_repository() { local repository + local package_repository + + package_repository="$1" + + if [ "$1" = 'build-support' ]; then + echo 'packages' + return 0 + fi for repository in ${repo_names}; do if [ "${repository}" = "archlinux32" ]; then continue fi - if [ -n "$( - ( - eval ls "$(printf '"${repo_paths__%s}"' "${repository}")/"*"/repos" | \ - grep -v ':$' | \ - sed 's|-[^-]\+$||' | \ - sort -u - echo "$1" - ) | \ - sort | \ - uniq -d - )" ]; then + if eval ls "$(printf '"${repo_paths__%s}"' "${repository}")/"*"/repos" | \ + grep -v ':$' | \ + sed 's|-[^-]\+$||' | \ + sort -u | \ + grep -qxF "${package_repository}"; then echo "${repository}" return 0 fi -- cgit v1.2.3-70-g09d2