sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 8db2c94dca8aceb558d7903b95d7d60624c246e4
parent 4f88892d49e6cf4c09e8ac5d150737ea3a68b9c2
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Wed, 13 Apr 2016 12:52:28 +0200

Rewrite make line only if jobs specified

See #41.

Diffstat:
MSBO-Lib/lib/SBO/Lib.pm | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm @@ -866,7 +866,9 @@ sub rewrite_slackbuild { if (exists $$changes{arch_out}) { $line =~ s/\$ARCH/$$changes{arch_out}/ if $line =~ $arch_regex; } - $line =~ s/make/make \$MAKEOPTS/ if $line =~ $make_regex; + if (exists $changes->{jobs}) { + $line =~ s/make/make \$MAKEOPTS/ if $line =~ $make_regex; + } } untie @sb_file; return 1; @@ -1009,6 +1011,9 @@ sub perform_sbo { } $cmd .= '. /etc/profile.d/32dev.sh &&'; } + if ($args{JOBS} and $args{JOBS} ne 'FALSE') { + $changes{jobs} = 1; + } $cmd .= " $args{OPTS}" if $args{OPTS}; $cmd .= " MAKEOPTS=\"-j$args{JOBS}\"" if $args{JOBS}; # we need to get a listing of /tmp/SBo, or $TMP, if we can, before we run