Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-09-01 11:08:03 +0200
committerErich Eckner <git@eckner.net>2017-09-01 11:08:03 +0200
commit36b60018b59293eba771c701462e89e1e3e1af5f (patch)
tree854d642812095afc3b3b733e3cf2164e1a5822de /bin/build-packages
parentf043383f96580cc276eca3cda49fa2a3ebbd2409 (diff)
bin/build-packages: understand "work-tree" as mod_git_revision (-l) to use current work-tree of archlinux32 for building
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 654da8d..d83a2e7 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -176,6 +176,17 @@ while [ "${count}" -ne 0 ]; do
git_revision="${package##* }"
package="${package% *}"
+ 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
+ tmp_subdir=$(mktemp -d);
+ trap 'rm -rf --one-file-system "${tmp_subdir}"' EXIT
+ export GIT_INDEX_FILE="${tmp_subdir}/index.new"
+ git -C "${repo_paths__archlinux32}" add -A
+ git -C "${repo_paths__archlinux32}" write-tree
+ )
+ fi
+
# Update git repositories (official packages, community packages and the repository of package customizations).
for repo_name in ${repo_names}; do