aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-03-15 03:27:32 -0400
committerB. Watson <yalhcru@gmail.com>2017-03-15 03:27:32 -0400
commit73b04b963c2311f54a29ced60ba87edb1176f2fe (patch)
tree037e1681a8ea9681eab1de2e5c22a32a42a01a1e /sbolint
parente37fa3cc138b3547ccfdf517ffee351136052295 (diff)
downloadsbostuff-73b04b963c2311f54a29ced60ba87edb1176f2fe.tar.gz
sbolint git repo support, warn if build logs found
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint23
1 files changed, 20 insertions, 3 deletions
diff --git a/sbolint b/sbolint
index 0b9c794..4577f1f 100755
--- a/sbolint
+++ b/sbolint
@@ -119,8 +119,8 @@ For all builds:
=item -
-The SlackBuild script must exist, with mode 0755, and be a I<#!/bin/sh>
-script.
+The SlackBuild script must exist, with mode 0755 (or 0644, if in a git repo),
+and be a I<#!/bin/sh> script.
=item -
@@ -198,6 +198,11 @@ checked for permissions (should be 0644) and excessive size.
The source archive(s) must not exist. Also sbolint attempts to detect
extracted source trees (but isn't all that good at it).
+=item -
+
+Files named 'build.log' or 'strace.out*' must not exist. The B<sbrun>
+tool creates these.
+
=back
=head1 EXIT STATUS
@@ -880,7 +885,15 @@ sub curl_head_request {
sub check_script {
my $file = $buildname . ".SlackBuild";
- my @lines = check_and_read($file, 0755);
+ my $wantmode = 0755;
+
+ # are we in a git repo? build scripts are mode 0644 there.
+ my $got = system("git status >/dev/null 2>/dev/null");
+ if($got == 0) {
+ $wantmode = 0644;
+ }
+
+ my @lines = check_and_read($file, $wantmode);
return unless scalar @lines;
if($lines[0] !~ /^#/) {
@@ -1025,6 +1038,10 @@ sub check_junkfiles {
log_warning("$file looks like sort some of backup file");
next FILE;
};
+ /^(?:build.log|strace.out)/ && do {
+ log_warning("$file is a build log");
+ next FILE;
+ };
/\.desktop$/ && do {
system("desktop-file-validate $file");
if($? != 0) {