index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-05-05 12:36:02 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-05-05 12:36:02 +0200 |
commit | bfbef03c657cd15230bf36d283fb18f899fbd67f (patch) | |
tree | fa70422aa5d80243bc44ff33f10f101a60b3a821 /bin/common-functions | |
parent | 323dc12ec01c2f52ebc0ebc4e6c0e2133cd9277a (diff) |
-rwxr-xr-x | bin/common-functions | 24 |
diff --git a/bin/common-functions b/bin/common-functions index d6b4858..765610c 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -29,3 +29,27 @@ find_repository_with_commit() { >&2 echo "can't find repository with commit '$1'" exit 1 } + +find_git_repository_to_package_repository() { + for repository in "${!repo_paths[@]}"; do + if [ "${repository}" == "archlinux32" ]; then + continue + fi + if [ -n "$( + ( + ls "${repo_paths["${repository}"]}/"*"/repos" | \ + grep -v ':$' | \ + sed 's|-[^-]\+$||' | \ + sort -u + echo "$1" + ) | \ + sort | \ + uniq -d + )" ]; then + echo "${repository}" + return 0 + fi + done + >&2 echo "can't find git repository with package repository '$1'" + exit 1 +} |