Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/common-functions
diff options
context:
space:
mode:
Diffstat (limited to 'bin/common-functions')
-rwxr-xr-xbin/common-functions24
1 files changed, 24 insertions, 0 deletions
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
+}