index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-09-24 09:29:20 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-24 09:29:20 +0200 |
commit | c3e4c542a81586cf7dc731a679d6caf904830278 (patch) | |
tree | da1f441c6c261555429c2d821ea7b6a4dc5a5132 | |
parent | d033fbd631e5b9d3e99d9692ca2f3364da0d293e (diff) |
-rwxr-xr-x | bin/return-assignment | 19 |
diff --git a/bin/return-assignment b/bin/return-assignment index 45ff3d3..2fd533e 100755 --- a/bin/return-assignment +++ b/bin/return-assignment @@ -19,8 +19,6 @@ # TODO: sign database -# TODO: check packager - # shellcheck disable=SC2119,SC2120 # shellcheck source=../lib/load-configuration @@ -448,6 +446,23 @@ if [ -z "$( exit 3 fi +# check if the package maintainer is set +errors=$( + find . -maxdepth 1 -name '*.pkg.tar.xz' | \ + while read -r pkg; do + tar -OxJf "${pkg}" '.BUILDINFO' 2>/dev/null | \ + grep -vxF 'packager = Unknown Packager' | \ + grep -q '^packager = ' || \ + printf '%s misses a valid packager.\n' \ + "${pkg##*/}" + done +) +if [ -n "${errors}" ]; then + >&2 echo 'Packager error(s):' + >&2 printf '%s' "${errors}" + exit 3 +fi + # check if the sent packages are the expected ones find . -maxdepth 1 -name '*.pkg.tar.xz' -printf '%f\n' > \ "${tmp_dir}/packages" |