summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-03 10:33:42 +0200
committerErich Eckner <git@eckner.net>2017-07-03 10:33:42 +0200
commitf82935542240a54309ba06aec0a444a18c792e68 (patch)
tree363feef4deb103a2acdeb07d743ba0c691ec57b8 /bin/build-packages
parentfcfd7abfeb7dda72de365eb20038a9378301ccc5 (diff)
downloadbuilder-f82935542240a54309ba06aec0a444a18c792e68.tar.xz
bin/build-packages: do not cd into git tree, but merely archive the right files (otherwise git --fetch is not enough)
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 6ede573..9da778b 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -149,13 +149,13 @@ while [ ${count} -ne 0 ]; do
tmp_dir="$(mktemp -d "${work_dir}/tmp.XXXXXX")"
if [ -n "${PKGBUILD}" ]; then
- eval "git -C \"$(printf '${repo_paths__%s}' "${git_repo}")/${PKGBUILD%/*}\" archive '${git_revision}'" | \
- tar -x -C "${tmp_dir}"
+ eval 'git -C "'"$(printf '${repo_paths__%s}' "${git_repo}")"'"'" archive '${git_revision}' -- '${PKGBUILD%/*}'" | \
+ tar -x --strip-components=3 -C "${tmp_dir}"
fi
if [ -n "${PKGBUILD_mod}" ]; then
- git -C "${repo_paths__archlinux32}/${PKGBUILD_mod%/*}" archive "${mod_git_revision}" | \
- tar -x --overwrite --exclude 'PKGBUILD' -C "${tmp_dir}"
- git -C "${repo_paths__archlinux32}/${PKGBUILD_mod%/*}" archive "${mod_git_revision}" | \
+ git -C "${repo_paths__archlinux32}" archive "${mod_git_revision}" -- "${PKGBUILD_mod%/*}" | \
+ tar -x --overwrite --exclude 'PKGBUILD' --strip-components=2 -C "${tmp_dir}"
+ git -C "${repo_paths__archlinux32}" archive "${mod_git_revision}" -- "${PKGBUILD_mod}" | \
tar -Ox 'PKGBUILD' >> \
"${tmp_dir}/PKGBUILD"
fi