Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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