From 0c33d5051635a3dfe619f6b002d6cac406bbf57f Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Fri, 30 Nov 2012 07:44:59 -0600 Subject: add back sanity checks for -j and -p --- sboupgrade | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3