diff options
| -rw-r--r-- | ChangeLog.md | 4 | ||||
| -rwxr-xr-x | sbocheck | 5 | ||||
| -rwxr-xr-x | sboclean | 7 | ||||
| -rwxr-xr-x | sboconfig | 7 | ||||
| -rwxr-xr-x | sbofind | 7 | ||||
| -rwxr-xr-x | sboinstall | 7 | ||||
| -rwxr-xr-x | sboupgrade | 7 | 
7 files changed, 33 insertions, 11 deletions
| diff --git a/ChangeLog.md b/ChangeLog.md index fd5285b..45089ce 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -9,6 +9,10 @@ All notable changes to this project will be documented in this file.    - Download's are retried from a third party on failure.  Allow the user to      configure the third party source or disable this feature. +### Fixed + +  - Bail out early when bad command line arguments are given. +  ### Security    - Check SSL certificates when downloading.  Oddly, this was previously @@ -37,7 +37,10 @@ EOF  my ($help, $vers); -GetOptions('help|h' => \$help, 'version|v' => \$vers); +if (! GetOptions('help|h' => \$help, 'version|v' => \$vers)) { +  show_usage(); +  exit 1; +}  if ($help) { show_usage(); exit 0 }  if ($vers) { show_version(); exit 0 } @@ -42,13 +42,16 @@ EOF  my ($help, $vers, $dist, $work, $interactive); -GetOptions( +if (! GetOptions(  	'help|h'            => \$help,  	'version|v'         => \$vers,  	'dist|clean-dist|d' => \$dist,  	'work|clean-work|w' => \$work,  	'interactive|i'     => \$interactive, -); +)) { +  show_usage(); +  exit 1; +}  if ($help) { show_usage(); exit 0 }  if ($vers) { show_version(); exit 0 } @@ -62,7 +62,7 @@ EOF  my %options; -GetOptions(\%options, +if (! GetOptions(\%options,    'help|h',    'version|v',    'list|l', @@ -76,7 +76,10 @@ GetOptions(\%options,    'slackware-version|V=s',    'repo|r=s',    'gpg-key|g=s', -); +)) { +  show_usage(); +  exit 1; +}  if ($options{help}) { show_usage(); exit 0 }  if ($options{version}) { show_version(); exit 0 } @@ -43,7 +43,7 @@ EOF  my ($help, $vers, $search_exact, $exclude_tags, $show_info, $show_readme, $show_queue); -GetOptions( +if (! GetOptions(  	'help|h'    => \$help,  	'version|v' => \$vers,  	'exact|e'   => \$search_exact, @@ -51,7 +51,10 @@ GetOptions(  	'info|i'    => \$show_info,  	'readme|r'  => \$show_readme,  	'queue|q'   => \$show_queue, -); +)) { +  show_usage(); +  exit 1; +}  if ($help) { show_usage(); exit 0 }  if ($vers) { show_version(); exit 0 } @@ -61,7 +61,7 @@ my $distclean = $config{DISTCLEAN};  my $jobs = $config{JOBS};  my ($help, $vers, $no_install, $non_int, $no_reqs, $compat32, $ctemp, $utemp, $reinstall); -GetOptions( +if (! GetOptions(  	'help|h'            => \$help,  	'version|v'         => \$vers,  	'noclean|c=s'       => \$noclean, @@ -74,7 +74,10 @@ GetOptions(  	'reinstall'         => \$reinstall,  	'create-template=s' => \$ctemp,  	'use-template=s'    => \$utemp, -); +)) { +  show_usage(); +  exit 1; +}  if ($help) { show_usage(); exit 0 }  if ($vers) { show_version(); exit 0 } @@ -55,7 +55,7 @@ my $distclean = $config{DISTCLEAN};  my $jobs = $config{JOBS};  my ($help, $vers, $force, $no_install, $non_int, $force_reqs, $all); -GetOptions( +if (! GetOptions(  	'help|h'            => \$help,  	'version|v'         => \$vers,  	'noclean|c=s'       => \$noclean, @@ -66,7 +66,10 @@ GetOptions(  	'nointeractive|r'   => \$non_int,  	'force-reqs|z'      => \$force_reqs,  	'all'               => \$all, -); +)) { +  show_usage(); +  exit 1; +}  if ($help) { show_usage(); exit 0 }  if ($vers) { show_version(); exit 0 } | 
