#!/usr/bin/env perl # # vim: set ts=4:noet # # sboinstall # script to install a SlackBuild by name # # author: Jacob Pipkin # date: Pungenday, the 40th day of Discord in the YOLD 3178 # license: WTFPL use 5.12.3; use strict; use warnings FATAL => 'all'; use SBO::Lib; use Getopt::Long qw(:config bundling); use File::Basename; my $self = basename ($0); sub show_usage () { print < \$help, 'version|v' => \$vers, 'clean|c!' => \$clean, 'distclean|d!' => \$distclean, 'noinstall|i' => \$no_install, 'jobs|j=s' => \$jobs, 'compat32|p' => \$compat32, 'nointeractive|r' => \$non_int, 'norequirements|R' => \$no_reqs, ); show_usage and exit 0 if $help; show_version and exit 0 if $vers; show_usage and exit 0 unless exists $ARGV[0]; # setup any options unshift @ARGV, $clean ? '--noclean' : '-c'; unshift @ARGV, $distclean ? '-d' : '--distclean'; unshift @ARGV, '-n' if $no_install; unshift @ARGV, '-i' if $non_int; unshift @ARGV, '-R' if $no_reqs; unshift @ARGV, '-p' if $compat32; unshift @ARGV, "-j$jobs" if $jobs; system '/usr/sbin/sboupgrade', '-oN', @ARGV; exit 0;