diff options
author | B. Watson <urchlay@slackware.uk> | 2023-05-12 21:12:32 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-05-12 21:12:32 -0400 |
commit | 5220f663e45743cefbc94bb31e26509b88c92c8a (patch) | |
tree | 12b3f2c3ef7459b24bf102a1ce90ef5cb402bc74 /sbolint | |
parent | 18298dc73a71033049ba1a27e0d0b856aef3850c (diff) | |
download | sbo-maintainer-tools-5220f663e45743cefbc94bb31e26509b88c92c8a.tar.gz |
sbolint: check TMP PKG OUTPUT; sbopkglint: check empty man dirs.
Diffstat (limited to 'sbolint')
-rwxr-xr-x | sbolint | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -196,7 +196,8 @@ I<VERSION> must match the I<VERSION> in the .info file. =item - -I<TAG=${TAG:-_SBo}> must occur in the script. +I<TAG=${TAG:-_SBo}>, I<TMP=${TMP:-/tmp/SBo}>, I<PKG=$TMP/package-$PRGNAM>, and +I<OUTPUT=${OUTPUT:-/tmp}> 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"); } |