From df8740ed54f45f90a6ace003f3260c0d3a1d43da Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sun, 12 Jul 2026 01:52:58 -0400 Subject: sbolint: Only allow one .info file in the SlackBuild dir. --- sbolint | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'sbolint') diff --git a/sbolint b/sbolint index 7e31b24..cdf62da 100755 --- a/sbolint +++ b/sbolint @@ -188,6 +188,10 @@ and be a I<#!/bin/bash> script. =item - +Only one file ending in .info may exist. + +=item - + The script must contain the standard variable assignments for PRGNAM, VERSION, BUILD, and TAG. BUILD must be numeric. @@ -1049,8 +1053,21 @@ sub check_slackdesc { } } +sub check_extra_info { + my @i; + push @i, <*.info>; + push @i, <*/*.info>; + push @i, <*/*/*.info>; + my $count = scalar @i; + + if($count > 1) { + log_error("multiple .info file(s) found: " . join(" ", @i)); + } +} + # This is a damn mess. Needs refactoring badly. sub check_info { + check_extra_info(); my $file = $buildname . ".info"; my @lines = check_and_read($file, 0644); return unless scalar @lines; -- cgit v1.2.3