index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/common-functions | 11 |
diff --git a/bin/common-functions b/bin/common-functions index 2191d01..7b5aa18 100755 --- a/bin/common-functions +++ b/bin/common-functions @@ -18,3 +18,14 @@ find_pkgbuild() { sort | \ tail -n1 } + +find_repository_with_commit() { + for repository in "${!repo_paths[@]}"; do + if [ "$(git -C "${repo_paths["${repository}"]}" cat-file -t "$1")" == "commit" ]; then + echo "${repository}" + return 0 + fi + done + >&2 echo "can't find repository with commit '$1'" + exit 1 +} |