index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-09-04 09:36:36 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-09-04 09:36:36 +0200 |
commit | e029dd74065a58b4c5fdf7dbab369804fddb2683 (patch) | |
tree | f670eb30aa536d18231f1ebe269b0d75ee39bcd6 | |
parent | 0a2788e175448702a4630f141d6c2c608fe6829b (diff) |
-rwxr-xr-x | bin/build-packages | 12 |
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 |