From ce96974aa8c63529b5680937b1f9ed70468c5fd7 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 14 Feb 2023 00:36:23 -0500 Subject: sbolint: 15.0 template checks. --- sbolint | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sbolint b/sbolint index ae90327..247c9cb 100755 --- a/sbolint +++ b/sbolint @@ -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(/^[^#]*/) { -- cgit v1.2.3