diff options
Diffstat (limited to 'sboinstall')
-rwxr-xr-x | sboinstall | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -9,6 +9,7 @@ # date: Pungenday, the 40th day of Discord in the YOLD 3178 # license: WTFPL <http://sam.zoy.org/wtfpl/COPYING> +use 5.16.0; use SBO::Lib; use Getopt::Std; use File::Basename; @@ -17,7 +18,7 @@ use warnings FATAL => 'all'; my $self = basename ($0); -sub show_usage { +sub show_usage () { print <<EOF Usage: $self [options] sbo @@ -38,10 +39,10 @@ EOF my %options; getopts ('hvcdripj:R', \%options); -show_usage () and exit (0) if exists $options{h}; -show_version () and exit (0) if exists $options{v}; +show_usage and exit 0 if exists $options{h}; +show_version and exit 0 if exists $options{v}; -show_usage () and exit (0) unless exists $ARGV[0]; +show_usage and exit 0 unless exists $ARGV[0]; # setup any options which do not require arguments my @opts1 = ('c', 'd', 'r', 'i', 'p', 'R'); @@ -55,6 +56,7 @@ for my $opt (@opts2) { unshift @ARGV, "-$opt $options{$opt}" if exists $options{$opt}; } -unshift @ARGV, '/usr/sbin/sboupgrade', '-oN'; -system @ARGV; +system '/usr/sbin/sboupgrade', '-oN', @ARGV; + exit 0; + |