aboutsummaryrefslogtreecommitdiff
path: root/SBO-Lib/lib
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-05 15:36:02 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-05 15:38:27 +0100
commitd056e68dca8254c0d6769fb8871e29f5036061db (patch)
treec714ae6f609244c9bf983ad67f031ed7b84213c4 /SBO-Lib/lib
parentfae2c83aff6c216a84bfb4317c821b8199e18c0a (diff)
downloadsbotools2-d056e68dca8254c0d6769fb8871e29f5036061db.tar.xz
sboupgrade: add --all option for all upgrades
In order to not be asked twice about things already supplied we also need uniq to be exported from SBO::Lib. This fixes #9
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r--SBO-Lib/lib/SBO/Lib.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm
index 2a7a338..eee6210 100644
--- a/SBO-Lib/lib/SBO/Lib.pm
+++ b/SBO-Lib/lib/SBO/Lib.pm
@@ -53,6 +53,7 @@ our @EXPORT = qw(
process_sbos
print_failures
usage_error
+ uniq
$tempdir
$conf_dir
$conf_file
@@ -988,7 +989,7 @@ sub get_requires {
return $$info[0] ne '' ? $info : undef;
}
-sub _uniq {
+sub uniq {
my %seen;
return grep { !$seen{$_}++ } @_;
}
@@ -1010,7 +1011,7 @@ sub _build_queue {
push @result, $sbo;
}
- return _uniq @result;
+ return uniq @result;
}
sub get_build_queue {
@@ -1023,7 +1024,7 @@ sub merge_queues {
# Results in queue_b being merged into queue_a (without duplicates)
exists $_[1] or script_error('merge_queues requires two arguments.');
- return [ _uniq @{$_[0]}, @{$_[1]} ];
+ return [ uniq @{$_[0]}, @{$_[1]} ];
}
sub get_readme_contents {