Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/build-packages3
-rwxr-xr-xbin/common-functions11
2 files changed, 13 insertions, 1 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 339a8bc..d4fc8b9 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -38,9 +38,10 @@ while true; do
git -C "${repo}" clean -df
git -C "${repo}" checkout master
git -C "${repo}" pull
- git -C "${repo}" checkout "${git_revision}" &> /dev/null || true
done
+ git -C "${repo_paths["$(find_repository_with_commit "${git_revision}")"]}" checkout "${git_revision}" &> /dev/null
+
PKGBUILD="$(find_pkgbuild "${package}" "${repository}")"
if [ ! -r "${PKGBUILD}" ]; then
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
+}