aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Pipkin <d4wnr4z0r@yahoo.com>2012-05-13 12:56:52 -0500
committerJacob Pipkin <d4wnr4z0r@yahoo.com>2012-05-13 12:56:52 -0500
commit93aaff63e831afcdf15df4fe0e577e15e886c5a3 (patch)
tree2d41c921b9ef61170b27d43646d625dbd9ac08f6
parent82a92793bd54b304d05aae1d7d5f0479a24c9540 (diff)
downloadsbotools2-93aaff63e831afcdf15df4fe0e577e15e886c5a3.tar.xz
added jobs setting to sboconfig
-rwxr-xr-xsboconfig19
1 files changed, 14 insertions, 5 deletions
diff --git a/sboconfig b/sboconfig
index 2cb4847..727a6f0 100755
--- a/sboconfig
+++ b/sboconfig
@@ -33,6 +33,8 @@ Config options (defaults shown):
NOCLEAN: if TRUE, do NOT clean up after building by default.
-d FALSE:
DISTCLEAN: if TRUE, DO clean distfiles by default after building.
+ -j FALSE:
+ JOBS: numeric -j setting to feed to make for multicore systems.
-p FALSE:
PKG_DIR: set a directory to store packages in.
-s /usr/sbo:
@@ -44,7 +46,7 @@ EOF
}
my %options;
-getopts ('hvlc:d:p:s:',\%options);
+getopts ('hvlc:d:p:s:j:',\%options);
show_usage () and exit (0) if exists $options{h};
show_version () and exit (0) if exists $options{v};
@@ -57,11 +59,18 @@ if (exists $options{l}) {
show_usage () unless %options;
+my %valid_confs = (
+ c => 'NOCLEAN',
+ d => 'DISTCLEAN',
+ j => 'JOBS',
+ p => 'PKG_DIR',
+ s => 'SBO_HOME',
+);
+
my %changes;
-$changes{NOCLEAN} = $options{c} if exists $options{c};
-$changes{DISTCLEAN} = $options{d} if exists $options{d};
-$changes{PKG_DIR} = $options{p} if exists $options{p};
-$changes{SBO_HOME} = $options{s} if exists $options{s};
+while (my ($key,$value) = each %valid_confs) {
+ $changes{$value} = $options{$key} if exists $options{$key};
+}
my $conf_dir = $SBO::Lib::conf_dir;;
my $conf_file = $SBO::Lib::conf_file;