summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-01-19 19:05:13 +0100
committerErich Eckner <git@eckner.net>2021-01-19 19:05:13 +0100
commit60abcbf00dfcda7a9552992c17730d019ae9ea3f (patch)
tree744ea68f20026c97287b380fd2d8052bfbe6f253 /bin
parent198c1c537490c0cad8a76401d49bef8ecf0ab3c8 (diff)
downloadbuilder-60abcbf00dfcda7a9552992c17730d019ae9ea3f.tar.xz
bin/build-packages: run namcap if archbuild didn't create a namcap log
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build-packages18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 46c1ef1..acf0f79 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -697,15 +697,15 @@ while [ "${count}" -ne 0 ] && \
# compressing successful
echo 'post-build' > "${tmp_dir}/.ping-build-master"
>&2 printf ' ok.\n'
- if [ "${build_command}" = 'makepkg' ]; then
- find . -maxdepth 1 -type f -name '*.pkg.tar.zst' \
- -exec sh -c 'namcap "$1" > "$1-namcap.log"' '_' '{}' \;
- else
- find . -maxdepth 1 -type f -name '*.pkg.tar-namcap.log' \
- | while read -r file; do
- mv "${file}" "${file%-namcap.log}.zst-namcap.log"
- done
- fi
+ find . -maxdepth 1 -type f -name '*.pkg.tar.zst' \
+ -exec sh -c '
+ pkg="${1%.pkg.tar.zst}"
+ if [ -f "${pkg}.pkg.tar-namcap.log" ]; then
+ mv "${pkg}.pkg.tar-namcap.log" "${pkg}.pkg.tar.zst-namcap.log"
+ elif [ ! -f "${pkg}.pkg.tar.zst-namcap.log" ]; then
+ namcap "$1" > "${pkg}.pkg.tar.zst-namcap.log"
+ fi
+ ' '_' '{}' \;
tar_content_dir=$(mktemp -d "${tmp_dir}/tar-content.XXXXXX")
# remove unexpected packages
if [ -n "${expected_packages}" ]; then