diff options
Diffstat (limited to 'sbolint')
| -rwxr-xr-x | sbolint | 23 | 
1 files changed, 20 insertions, 3 deletions
@@ -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) {  | 
