Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/local-build-package
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-02-13 15:26:44 +0100
committerErich Eckner <git@eckner.net>2020-02-13 15:26:44 +0100
commit8cff1bf6eda4945ade0619e57a20e37d6f168011 (patch)
tree02bc5d3a56b793dd9327624d94f359dbb9498b7f /bin/local-build-package
parente741a8e64c44a6dc6eb5bbb089224613cbcd496d (diff)
bin/local-build-package: remove hard-coded package suffixes
Diffstat (limited to 'bin/local-build-package')
-rwxr-xr-xbin/local-build-package29
1 files changed, 18 insertions, 11 deletions
diff --git a/bin/local-build-package b/bin/local-build-package
index fd4fdab..a04cc0d 100755
--- a/bin/local-build-package
+++ b/bin/local-build-package
@@ -7,8 +7,6 @@
# shellcheck source=../lib/load-configuration
. "${0%/*}/../lib/load-configuration"
-# TODO: remove hard-coded package suffixes
-
# shellcheck disable=SC2016
usage() {
>&2 echo ''
@@ -173,9 +171,9 @@ if ! ${nobuild}; then
extract_source_directory "${git_repo}" "${git_revision}" "${mod_git_revision}" "${tmp_dir}"
- rm -f \
- ./*"-${arch}.pkg.tar.xz" ./*"-${arch}.pkg.tar.xz.sig" \
- ./*"-${arch}.pkg.tar.zst" ./*"-${arch}.pkg.tar.zst.sig"
+ find . -maxdepth 1 -type f \
+ -regex '.*\.pkg\.\('"${package_compression_suffix_regex}"'\)\(\.sig\)\?' \
+ -delete
cd "${tmp_dir}" || exit 1
@@ -192,11 +190,12 @@ else
fi
if ${bootstrap}; then
- rm -f \
- ./*"-${arch}.pkg.tar.xz.sig" \
- ./*"-${arch}.pkg.tar.zst.sig"
+ find . -maxdepth 1 -type f \
+ -regex '.*\.pkg\.\('"${package_compression_suffix_regex}"'\)\.sig' \
+ -delete
- find . -maxdepth 1 -type f -name "*${arch}.pkg.tar.zst" \
+ find . -maxdepth 1 -type f \
+ -regex '.*\.pkg\.\('"${package_compression_suffix_regex}"'\)' \
-execdir gpg --local-user="${signkey}" --detach-sign '{}' \;
case "$repository" in
@@ -211,8 +210,16 @@ if ${bootstrap}; then
;;
esac
- scp -P "${bootstrap_port}" -rC "${tmp_dir}/"*"-${arch}.pkg.tar.zst" "${tmp_dir}/"*"-${arch}.pkg.tar.zst.sig" "${bootstrap_host}:${bootstrap_dir}/${staging_repo}/."
- ssh -p "${bootstrap_port}" "${bootstrap_host}" bash -l -c "'cd ${bootstrap_dir}/${staging_repo} && repo-add -n bootstrap-${staging_repo}.db.tar.gz *-${arch}.pkg.tar.zst'"
+ # shellcheck disable=SC2046
+ scp -P "${bootstrap_port}" -rC $(
+ find "${tmp_dir}" -type f \
+ -regex '.*\.pkg\.\('"${package_compression_suffix_regex}"'\)\(\.sig\)\?'
+ ) "${bootstrap_host}:${bootstrap_dir}/${staging_repo}/."
+ ssh -p "${bootstrap_port}" "${bootstrap_host}" bash -l -c "'cd ${bootstrap_dir}/${staging_repo} && repo-add -n bootstrap-${staging_repo}.db.tar.gz $(
+ find "${tmp_dir}" -type f \
+ -regex '.*\.pkg\.\('"${package_compression_suffix_regex}"'\)' \
+ -printf '%f '
+ )'"
fi
# do not delete build reports, why might actually to want to have a look for things