aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-09-08 06:29:52 -0400
committerB. Watson <urchlay@slackware.uk>2026-09-08 06:29:52 -0400
commit5bf90f4063b34b4fe11e71707e893dcef2a4a446 (patch)
treeedc588b301b4dacfcdf6fb289efa6f37ee1a04d8 /sbolint
parentb18fdc240a9871ccfb65105e8dde7a663d4aa767 (diff)
downloadsbo-maintainer-tools-5bf90f4063b34b4fe11e71707e893dcef2a4a446.tar.gz
sbolint: check for multiple .SlackBuild files
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint14
1 files changed, 8 insertions, 6 deletions
diff --git a/sbolint b/sbolint
index 464c5f3..65bd0bd 100755
--- a/sbolint
+++ b/sbolint
@@ -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);