aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Pipkin <j@dawnrazor.net>2012-06-01 12:45:24 -0500
committerJacob Pipkin <j@dawnrazor.net>2012-06-01 12:45:24 -0500
commita8e3ae49bf5021ae6a7c5778628e5343aaea4275 (patch)
treef24dc71d255e1f451a31a17bf8435b0f0599b7e2
parent7439b87570df6b021f53c29b11d37d831fbd49a1 (diff)
downloadsbotools2-a8e3ae49bf5021ae6a7c5778628e5343aaea4275.tar.xz
added -R option to sbo(install|upgrade) to view README but not parse requirements
-rwxr-xr-xsboinstall5
-rwxr-xr-xsboupgrade5
2 files changed, 7 insertions, 3 deletions
diff --git a/sboinstall b/sboinstall
index 73a925f..b36cb59 100755
--- a/sboinstall
+++ b/sboinstall
@@ -28,12 +28,13 @@ Options:
-j: specify "-j" setting to make, for multicore systems; overrides conf file.
-p: install an SBo as a -compat32 pkg on a multilib x86_64 system.
-r: skip viewing of the SBo README.
+ -R: view the README but do not attempt to parse requirements.
EOF
}
my %options;
-getopts ('hvcdripj:', \%options);
+getopts ('hvcdripj:R', \%options);
show_usage () and exit (0) if exists $options{h};
show_version () and exit (0) if exists $options{v};
@@ -41,7 +42,7 @@ show_version () and exit (0) if exists $options{v};
show_usage () and exit (0) unless exists $ARGV[0];
# setup any options which do not require arguments
-my @opts1 = ('c', 'd', 'r', 'i', 'p');
+my @opts1 = ('c', 'd', 'r', 'i', 'p', 'R');
for my $opt (@opts1) {
unshift (@ARGV, "-$opt") if exists $options{$opt};
}
diff --git a/sboupgrade b/sboupgrade
index fa9060b..d311011 100755
--- a/sboupgrade
+++ b/sboupgrade
@@ -31,6 +31,7 @@ Options:
-j: specify "-j" setting to make, for multicore systems; overrides conf file.
-N: install any new SBo's listed.
-r: skip viewing of the SBo README.
+ -R: view the README but do not attempt to parse requirements.
Example:
$self -d libsexy
@@ -40,7 +41,7 @@ EOF
}
my %options;
-getopts ('hvacdfj:Nriop', \%options);
+getopts ('hvacdfj:NriopR', \%options);
show_usage () && exit (0) if exists $options{h};
show_version () && exit (0) if exists $options{v};
@@ -52,6 +53,7 @@ my $no_readme = exists $options{r} ? 'TRUE' : 'FALSE';
my $no_install = exists $options{i} ? 'TRUE' : 'FALSE';
my $only_new = exists $options{o} ? 'TRUE' : 'FALSE';
my $compat32 = exists $options{p} ? 'TRUE' : 'FALSE';
+my $no_reqs = exists $options{R} ? 'TRUE' : 'FALSE';
if (exists $options{j}) {
die "You have provided an invalid parameter for -j\n" unless
@@ -83,6 +85,7 @@ sub get_readme_path {
sub grok_requirements {
script_error ('grok_requirements requires two arguments')
unless exists $_[1];
+ return if $no_reqs eq 'TRUE';
my ($sbo, $readme) = @_;
my $readme_orig = $readme;
# work around missing period at end of list of requirements (given 2 \ns),