From 36b60018b59293eba771c701462e89e1e3e1af5f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 1 Sep 2017 11:08:03 +0200 Subject: bin/build-packages: understand "work-tree" as mod_git_revision (-l) to use current work-tree of archlinux32 for building --- bin/build-packages | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bin/build-packages') 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 -- cgit v1.2.3-54-g00ecf