From f82935542240a54309ba06aec0a444a18c792e68 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 3 Jul 2017 10:33:42 +0200 Subject: bin/build-packages: do not cd into git tree, but merely archive the right files (otherwise git --fetch is not enough) --- bin/build-packages | 10 +++++----- 1 file 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 -- cgit v1.2.3-70-g09d2