From 5220f663e45743cefbc94bb31e26509b88c92c8a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 12 May 2023 21:12:32 -0400 Subject: sbolint: check TMP PKG OUTPUT; sbopkglint: check empty man dirs. --- sbolint | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'sbolint') diff --git a/sbolint b/sbolint index 3634f04..748410c 100755 --- a/sbolint +++ b/sbolint @@ -196,7 +196,8 @@ I must match the I in the .info file. =item - -I must occur in the script. +I, I, I, and +I must occur in the script. =item - @@ -1200,6 +1201,21 @@ sub check_script { if($tag !~ /\$\{TAG:-(?:_SBo|("|')_SBo(\1))\}/) { log_error("$file:$lineno: TAG=\${TAG:-_SBo} is required"); } + } elsif(/^TMP=(\S+)/) { + $tmp = dequote($1); + if($tmp ne '${TMP:-/tmp/SBo}') { + log_error("$file:$lineno: TMP=\${TMP:-/tmp/SBo} is required"); + } + } elsif(/^PKG=(\S+)/) { + $pkg = dequote($1); + if($pkg ne '$TMP/package-$PRGNAM') { + log_error("$file:$lineno: PKG=\$TMP/package-\$PRGNAM is required"); + } + } elsif(/^OUTPUT=(\S+)/) { + $output = dequote($1); + if($output ne '${OUTPUT:-/tmp}') { + log_error("$file:$lineno: OUTPUT=\${OUTPUT:-/tmp} is required"); + } } elsif(/^[^#]*\$\{?CWD\}?\/doinst\.sh/) { # 20220205 bkw: some scripts don't have a doinst.sh in the # script dir, but they create one with >> (the jack rt audio stuff @@ -1276,6 +1292,18 @@ sub check_script { log_error("$file: no TAG= line"); } + if(not defined($tmp)) { + log_error("$file: no TMP= line"); + } + + if(not defined($pkg)) { + log_error("$file: no PKG= line"); + } + + if(not defined($output)) { + log_error("$file: no OUTPUT= line"); + } + if(not defined($slackdesc)) { log_error("$file: doesn't seem to install slack-desc in \$PKG/install"); } -- cgit v1.2.3