From 835f7cdaf808ed39bad7b08732266b718874c6e1 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 8 Apr 2022 14:52:58 -0400 Subject: cosmetics; --version; sbopkglint summary --- sbopkglint | 59 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 13 deletions(-) (limited to 'sbopkglint') diff --git a/sbopkglint b/sbopkglint index 16965b4..970816c 100755 --- a/sbopkglint +++ b/sbopkglint @@ -1,5 +1,10 @@ #!/bin/bash +# 20220408 bkw: note to self: VER must be in sync with VERSION in sbolint +# and the Makefile. + +VER=0.5 + : < + +Print the B version number on stdout and exit. + =back =head1 EXIT STATUS @@ -341,7 +351,7 @@ problem, so it might not be fixed any time soon. =head1 AUTHOR -B. Watson , AKA Urchlay on Libera IRC. +B. Watson , aka Urchlay on Libera IRC. =head1 SEE ALSO @@ -350,18 +360,11 @@ B(1) =cut EOF -# lint a binary Slackware package. primarily intended for use with -# SBo packages, but could be used for any Slack pkg. - -# this must be run as root, as it installs the package in a temp dir, -# with "installpkg -root". if it's not running as root, it tries to -# run itself via sudo. - SELF="$( basename $0 )" usage() { cat 1>&2 < $PKG/.tmp.$$ S="$?" @@ -520,10 +536,27 @@ for package in $packages; do if [ "$totalwarns" = "0" ]; then echo "=== $filename: All tests passed" + : $(( passcount ++ )) else exit_status=1 echo "!!! $filename: $totalwarns failures" + : $(( failcount ++ )) + faillist+="$filename " fi + [ "$want_summary" = "1" ] && echo done +if [ "$want_summary" = "1" ]; then + count=$(( failcount + passcount )) + echo "=== $count packages linted, $passcount passed, $failcount failed" + if [ "$failcount" = "0" ]; then + echo "=== All packages check out OK" + else + echo "!!! Failed packages:" + for i in $faillist; do + echo $i + done + fi +fi + exit $exit_status -- cgit v1.2.3