aboutsummaryrefslogtreecommitdiff
path: root/sboinstall
diff options
context:
space:
mode:
authorj pipkin <j@dawnrazor.net>2013-09-22 07:52:03 -0500
committerj pipkin <j@dawnrazor.net>2013-09-22 07:52:03 -0500
commit4081d3d6b22f1db7d14a7a725f592d73602ffe48 (patch)
treedcfe253ec24ce32221f08ac893f7c2b9dce82517 /sboinstall
parent5bd0ec56ac20709daa775427eb7e5070178839e9 (diff)
parent91a2e19799bdb10a37b9b48d943f00cd87b71ba9 (diff)
downloadsbotools2-4081d3d6b22f1db7d14a7a725f592d73602ffe48.tar.xz
Merge branch 'smartmatch'
Diffstat (limited to 'sboinstall')
-rwxr-xr-xsboinstall23
1 files changed, 15 insertions, 8 deletions
diff --git a/sboinstall b/sboinstall
index 0f87d5a..ad28349 100755
--- a/sboinstall
+++ b/sboinstall
@@ -111,26 +111,33 @@ s/::/-/g for @$pms;
# check for already-installeds and prompt for the rest
my (@temp_queue, %commands, %options);
my $added = ' added to install queue.';
+my %inst_names;
+$inst_names{$_} = 1 for @$inst_names;
+
FIRST: for my $sbo (@$build_queue) {
my $name = $compat32 ? "$sbo-compat32" : $sbo;
- if ($name ~~ @$inst_names) {
- say "$name already installed.";
- next FIRST;
- } else {
+
+ if ($inst_names{$name}) {
+ say "$name already installed.";
+ next FIRST;
+ } else {
if ($sbo =~ /^perl-/) {
my $pm_name = $sbo;
$pm_name =~ s/^perl-//;
- if (/^$pm_name$/i ~~ @$pms) {
- say "$sbo installed via the cpan.";
- next FIRST;
+ for my $pm (@$pms) {
+ if ($pm =~ /^$pm_name$/i) {
+ say "$sbo installed via the cpan.";
+ next FIRST;
+ }
}
}
}
+
$locations{$name} = get_sbo_location($sbo) if $compat32;
unless ($non_int) {
# if compat32 is TRUE, we need to see if the non-compat version exists.
if ($compat32) {
- unless ($sbo ~~ @$inst_names) {
+ unless ($inst_names{$sbo}) {
say "$name requires $sbo.";
my ($cmds, $opts, $exit) = user_prompt($sbo, $locations{$sbo});
if ($exit) {