diff options
author | Graham Forest <vladimir@gentoo.org> | 2003-03-07 05:53:57 +0000 |
---|---|---|
committer | Graham Forest <vladimir@gentoo.org> | 2003-03-07 05:53:57 +0000 |
commit | c7fcb18d3ff348c7dc5c72920da7da46dddcec25 (patch) | |
tree | dafa4d1d32ec26960fa462f8d3dabc5e050d8f1b /users/vladimir/esearch | |
parent | removed -dev mailinglist reference (diff) | |
download | gentoo-c7fcb18d3ff348c7dc5c72920da7da46dddcec25.tar.gz gentoo-c7fcb18d3ff348c7dc5c72920da7da46dddcec25.tar.bz2 gentoo-c7fcb18d3ff348c7dc5c72920da7da46dddcec25.zip |
SYN
Diffstat (limited to 'users/vladimir/esearch')
-rw-r--r-- | users/vladimir/esearch/edb.pl | 10 | ||||
-rw-r--r-- | users/vladimir/esearch/esearch.pl | 18 |
2 files changed, 21 insertions, 7 deletions
diff --git a/users/vladimir/esearch/edb.pl b/users/vladimir/esearch/edb.pl index f7ccce871b..e83e76d475 100644 --- a/users/vladimir/esearch/edb.pl +++ b/users/vladimir/esearch/edb.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# $Header: /var/cvsroot/gentoo/users/vladimir/esearch/Attic/edb.pl,v 1.6 2003/03/06 22:20:34 vladimir Exp $ +# $Header: /var/cvsroot/gentoo/users/vladimir/esearch/Attic/edb.pl,v 1.7 2003/03/07 05:53:57 vladimir Exp $ # Copyright (c) 2003 Graham Forest <vladimir@gentoo.org> # Distributed under the GPL v2 or later use strict; @@ -19,6 +19,8 @@ my $PORTDIR_OVERLAY = "/usr/portage_custom"; my $ARCH = `uname -a`; $ARCH = (split/ /, $ARCH)[10]; +$ARCH =~ s/sparc64/sparc/; + my ($ACCEPT_KEYWORDS) = grep(/^ACCEPT_KEYWORDS/, get_file("/etc/make.conf")) || "none"; @@ -81,6 +83,7 @@ sub wanted { } elsif (m/^HOMEPAGE="([^"]+)"/) { $page = "$1\0"; + $page =~ s|http://||g; $gotpage++; } elsif (m/^KEYWORDS="([^"]+)"/) { @@ -105,7 +108,7 @@ sub wanted { } sub ebuild_path_to_name { -# Take a path to an ebuild, turn it to the category/name-version +# Take a path to an ebuild, turn it to the category, name, version return ($1, $2, $3) if $_[0] =~ m/ ([\w0-9-]+) # Category \/ # Slash @@ -132,3 +135,6 @@ sub get_file { close MOO; return @contents; } + + +/msg chanserv akick #chatzone del 1 diff --git a/users/vladimir/esearch/esearch.pl b/users/vladimir/esearch/esearch.pl index 1b8bb7ced7..74c512bd10 100644 --- a/users/vladimir/esearch/esearch.pl +++ b/users/vladimir/esearch/esearch.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# $Header: /var/cvsroot/gentoo/users/vladimir/esearch/Attic/esearch.pl,v 1.5 2003/03/06 22:22:27 vladimir Exp $ +# $Header: /var/cvsroot/gentoo/users/vladimir/esearch/Attic/esearch.pl,v 1.6 2003/03/07 05:53:57 vladimir Exp $ # Copyright (c) 2003 Graham Forest <vladimir@gentoo.org> # Distributed under the GPL v2 or later # @@ -46,7 +46,15 @@ unless ($regex) { } # Grab our DB -my @packages = get_file("packages.txt"); +my @packages; +if ( -e "packages.txt" ) { + @packages = get_file("packages.txt"); +} +else { + print RED "Please regenerate your db by typing ./edb.pl", RESET, "\n"; + exit; +} + # First line of the DB is our arch, followed by any accepted keywords # as set in /etc/make.conf @@ -73,7 +81,7 @@ for (@packages) { for (@ACCEPT_KEYWORDS) { # Check if any accepted keywords exist - $keyworks++ if $keywords =~ /[" ]$_[" ]/; + $keyworks++ if $keywords =~ / $_ /; } # Remove leading and trailing space in keywords @@ -97,8 +105,8 @@ for (@packages) { print "]\n"; # Print our description and home page - print "Description : $desc\n"; - print "Home page : $homepage", RESET, "\n\n"; + print " Description : $desc\n"; + print " Home page : $homepage", RESET, "\n\n"; } |