sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 004265df979938f0f43e597f0243cc746d899033
parent cf6128eb021020243cdb23e3dc3b1eca66368944
Author: Jacob Pipkin <j@dawnrazor.net>
Date:   Tue,  5 Jun 2012 14:09:33 -0500

further reduction of code for get_installed_sbos () sub.

Diffstat:
MSBO-Lib/lib/SBO/Lib.pm | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm @@ -205,10 +205,9 @@ sub slackbuilds_or_fetch { # currently installed. starting to think it might be better to only pull an # array of names, and have another sub to pull the versions. sub get_installed_sbos { - my @paths = </var/log/packages/*_SBo>; - $_ =~ s#.*/([^/]+)$#$1#g for @paths; my @installed; - for my $path (@paths) { + for my $path (</var/log/packages/*_SBo>) { + $path =~ s#.*/([^/]+)$#$1#g; my @split = split (/-/, reverse ($path), 4); my $name = reverse ($split[3]); my $version = reverse ($split[2]);