Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-09-04 09:36:36 +0200
committerErich Eckner <git@eckner.net>2017-09-04 09:36:36 +0200
commite029dd74065a58b4c5fdf7dbab369804fddb2683 (patch)
treef670eb30aa536d18231f1ebe269b0d75ee39bcd6
parent0a2788e175448702a4630f141d6c2c608fe6829b (diff)
bin/build-packages: accept "$git_repo-HEAD" as revision for package repository $git_repo
-rwxr-xr-xbin/build-packages12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/build-packages b/bin/build-packages
index a286ff8..0ba4a57 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -189,6 +189,18 @@ while [ "${count}" -ne 0 ]; do
git_revision="${package##* }"
package="${package% *}"
+ if [ "${git_revision##*-}" = 'HEAD' ]; then
+ git_revision=$(
+ repo_name="${git_revision%-*}"
+ eval repo_path='"${repo_paths__'"${repo_name}"'}"'
+ if [ -z "${repo_path}" ]; then
+ >&2 printf 'Unknown git repository "%s".\n' "${repo_name}"
+ exit 2
+ fi
+ git -C "${repo_path}" rev-parse HEAD
+ )
+ fi
+
if [ "${mod_git_revision}" = 'work-tree' ]; then
mod_git_revision=$(
# we can't just create an empty index-file with mktemp, because git doesn't like it