diff options
author | B. Watson <urchlay@slackware.uk> | 2023-02-14 00:36:23 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2023-02-14 00:36:23 -0500 |
commit | ce96974aa8c63529b5680937b1f9ed70468c5fd7 (patch) | |
tree | af977376541184a57a575480a11fe8cf0166cf29 | |
parent | dedd4e4bdd5285d7270b7cad89aff3c9090f55ac (diff) | |
download | sbo-maintainer-tools-ce96974aa8c63529b5680937b1f9ed70468c5fd7.tar.gz |
sbolint: 15.0 template checks.
-rwxr-xr-x | sbolint | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1147,6 +1147,9 @@ sub check_script { if(/^\s*[^#]/ && !defined($codestart)) { $codestart = $lineno; + if(not /^cd\s+"?\$\(\s*dirname\s+"?\$0.*CWD=.*pwd/) { + log_error("$file:$lineno: first line of code must be 'cd \$(dirname \$0) ; CWD=\$(pwd)'"); + } } if(/^###sbolint\s*(\S+)/) { @@ -1218,6 +1221,8 @@ sub check_script { log_error("$file:$lineno: makepkg called twice (here and line $makepkg"); } $makepkg = $lineno; + } elsif(/^\s*?CWD=/) { + log_error("$file:$lineno: lone CWD= assignment not valid in 15.0 template"); } if(/^[^#]*<documentation>/) { |