aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Pipkin <j@dawnrazor.net>2012-11-30 07:44:59 -0600
committerJacob Pipkin <j@dawnrazor.net>2012-11-30 07:44:59 -0600
commit0c33d5051635a3dfe619f6b002d6cac406bbf57f (patch)
treeeb3dce12c7f0969a9a1a6999033a7494855a81cc
parent18e1fa6ea838d56de91f611c4878ef4c43dace2c (diff)
downloadsbotools2-0c33d5051635a3dfe619f6b002d6cac406bbf57f.tar.xz
add back sanity checks for -j and -p
-rwxr-xr-xsboupgrade11
1 files changed, 10 insertions, 1 deletions
diff --git a/sboupgrade b/sboupgrade
index a6afe1a..b5db7a8 100755
--- a/sboupgrade
+++ b/sboupgrade
@@ -73,13 +73,22 @@ GetOptions (
show_usage and exit 0 if $help;
show_version and exit 0 if $vers;
-show_usage and exit 0 unless exists $ARGV[0];
+show_usage and exit 1 unless exists $ARGV[0];
say "Invalid arguments: --force-reqs and --installnew can not be used together."
and exit 0 if $force_reqs and $install_new;
$noclean = $noclean eq 'TRUE' ? 1 : 0;
$distclean = $distclean eq 'TRUE' ? 1 : 0;
+if ($jobs) {
+ die "You have provided an invalid value for -j\n"
+ unless ($jobs =~ /^\d+$/ || $jobs eq 'FALSE');
+}
+
+if ($compat32) {
+ die "compat32 only works on x86_64.\n" unless get_arch eq 'x86_64';
+}
+
my $rootpkg = $ARGV[0];
my %warnings;
my %options;