diff options
author | Erich Eckner <git@eckner.net> | 2018-02-23 10:30:46 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-23 10:30:46 +0100 |
commit | ff4a1f4cdb66d930fc781222a093b322f157e3f8 (patch) | |
tree | 0a86cc90720c027746aabc74311c9f607334defe /bin | |
parent | a4cb656d8fd5f7ca3358cc629ee2e8118f242089 (diff) | |
download | builder-ff4a1f4cdb66d930fc781222a093b322f157e3f8.tar.xz |
bin/build-packages: do not overwrite our files by upstream ones if source package is extracted
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-packages | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/build-packages b/bin/build-packages index 0e734dd..f15c99e 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -307,8 +307,19 @@ while [ "${count}" -ne 0 ]; do # we can't improve anything continue fi - # TODO: the below command also overwrites files which are intentionally overwritten by us (e.g. "config" in "core/linux" or "extra/linux-zen") - tar -xz --overwrite -f "${source_name}" --exclude PKGBUILD --strip-components=1 || true + # shellcheck disable=SC2046 + tar -xz --overwrite \ + -f "${source_name}" \ + --exclude PKGBUILD \ + $( + if [ -n "${PKGBUILD_mod}" ]; then + git -C "${repo_paths__archlinux32}/${PKGBUILD_mod%/*}" archive "${mod_git_revision}" -- . | \ + tar -t | \ + sed 's/^/--exclude /' + fi + ) \ + --strip-components=1 \ + || true fi if echo "${straw}" | \ |