diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-09-08 06:29:52 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-09-08 06:29:52 -0400 |
| commit | 5bf90f4063b34b4fe11e71707e893dcef2a4a446 (patch) | |
| tree | edc588b301b4dacfcdf6fb289efa6f37ee1a04d8 /sbolint | |
| parent | b18fdc240a9871ccfb65105e8dde7a663d4aa767 (diff) | |
| download | sbo-maintainer-tools-5bf90f4063b34b4fe11e71707e893dcef2a4a446.tar.gz | |
sbolint: check for multiple .SlackBuild files
Diffstat (limited to 'sbolint')
| -rwxr-xr-x | sbolint | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1073,21 +1073,22 @@ sub check_slackdesc { } } -sub check_extra_info { +sub check_multiples { + my $ext = shift; my @i; - push @i, <*.info>; - push @i, <*/*.info>; - push @i, <*/*/*.info>; + push @i, <*.$ext>; + push @i, <*/*.$ext>; + push @i, <*/*/*.$ext>; my $count = scalar @i; if($count > 1) { - log_error("multiple .info file(s) found: " . join(" ", @i)); + log_error("multiple .$ext files found: " . join(" ", @i)); } } # This is a damn mess. Needs refactoring badly. sub check_info { - check_extra_info(); + check_multiples('info'); my $file = $buildname . ".info"; my @lines = check_and_read($file, 0644); return unless scalar @lines; @@ -1468,6 +1469,7 @@ sub script_exists { # - cp -a <documentation> is an error sub check_script { + check_multiples('SlackBuild'); my $file = $buildname . ".SlackBuild"; my $gotmode = get_mode($file); |
