From f9d3cde04e4d7228d425cc76da76f0a96af75d36 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 13 Feb 2020 15:08:22 +0100 Subject: bin/sanity-check: remove hard-coded package suffixes --- bin/sanity-check | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'bin/sanity-check') diff --git a/bin/sanity-check b/bin/sanity-check index 913f5d9..5e964fb 100755 --- a/bin/sanity-check +++ b/bin/sanity-check @@ -7,8 +7,6 @@ # shellcheck source=../lib/load-configuration . "${0%/*}/../lib/load-configuration" -# TODO: remove hard-coded package suffixes - usage() { >&2 echo '' >&2 echo 'sanity-check [options] [checks]: check sanity of build master' @@ -352,15 +350,15 @@ while [ $# -gt 0 ]; do packages=$( ls_master_mirror "${arch}/${repo}" | \ - grep '\.pkg\.tar\.\(xz\|zst\)\(\.sig\)\?$' + grep '\.pkg\.\('"${package_compression_suffix_regex}"'\)\(\.sig\)\?$' ) || true errors=$( echo "${packages}" | \ grep '\S' | \ sed ' - s@^\(.*\.pkg\.tar\.\(xz\|zst\)\)$@package \1@ - s@^\(.*\.pkg\.tar\.\(xz\|zst\)\)\.sig$@signature \1@ + s@^\(.*\.pkg\.\('"${package_compression_suffix_regex}"'\)\)$@package \1@ + s@^\(.*\.pkg\.\('"${package_compression_suffix_regex}"'\)\)\.sig$@signature \1@ ' | \ sort -k2 | \ uniq -cf1 | \ @@ -394,7 +392,7 @@ while [ $# -gt 0 ]; do ' echo "${packages}" | \ sed ' - /\.pkg\.tar\.\(xz\|zst\)$/ !d + /\.pkg\.\('"${package_compression_suffix_regex}"'\)$/ !d s/^/in_repository / ' | \ sort -u @@ -480,7 +478,7 @@ while [ $# -gt 0 ]; do while read -r repo; do ls_master_mirror "${arch}/${repo}" | \ sed ' - /\.pkg\.tar\.\(xz\|zst\)$/!d + /\.pkg\.\('"${package_compression_suffix_regex}"'\)$/!d s,^,package-file '"${arch}"'/'"${repo}"'/, ' done -- cgit v1.2.3-70-g09d2