diff options
author | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-13 12:56:52 -0500 |
---|---|---|
committer | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-13 12:56:52 -0500 |
commit | 93aaff63e831afcdf15df4fe0e577e15e886c5a3 (patch) | |
tree | 2d41c921b9ef61170b27d43646d625dbd9ac08f6 | |
parent | 82a92793bd54b304d05aae1d7d5f0479a24c9540 (diff) | |
download | sbotools2-93aaff63e831afcdf15df4fe0e577e15e886c5a3.tar.xz |
added jobs setting to sboconfig
-rwxr-xr-x | sboconfig | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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; |