From 749c34a0871eb63161ec2ae9f0c221f61053a329 Mon Sep 17 00:00:00 2001 From: agriffis Date: Thu, 27 Oct 2005 15:50:36 +0000 Subject: [PATCH] Fix comment handling. Add ~ as a synonym for ~all (for SpanKY) svn path=/; revision=251 --- trunk/src/ekeyword/ChangeLog | 4 ++++ trunk/src/ekeyword/ekeyword | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/trunk/src/ekeyword/ChangeLog b/trunk/src/ekeyword/ChangeLog index 6be92a5..d0fa818 100644 --- a/trunk/src/ekeyword/ChangeLog +++ b/trunk/src/ekeyword/ChangeLog @@ -1,3 +1,7 @@ +27 Oct 2005 Aron Griffis + * Fix handling of comments + * Add support for bare ~ as a synonym for ~all + 23 Mar 2005 Aron Griffis * Only modify non-masked keywords with "all" diff --git a/trunk/src/ekeyword/ekeyword b/trunk/src/ekeyword/ekeyword index 738540b..e75ce93 100644 --- a/trunk/src/ekeyword/ekeyword +++ b/trunk/src/ekeyword/ekeyword @@ -21,8 +21,9 @@ unless (@ARGV > 0) { die "syntax: ekeyword { arch | ~[arch] | -[arch] } ebuild...\n" } for my $a (@ARGV) { - next if $a =~ /$kw_re/o; # keyword - next if $a =~ /^\S+\.ebuild$/; # ebuild + $a = '~all' if $a eq '~' or $a eq $ENV{'HOME'}; # for vapier + next if $a =~ /$kw_re/o; # keyword + next if $a =~ /^\S+\.ebuild$/; # ebuild die "I don't understand $a\n"; } @@ -42,7 +43,7 @@ for my $f (@ARGV) { /^KEYWORDS/ or print, next; # extract the quoted section from KEYWORDS - (my $quoted = $_) =~ s/^.*["'](.*?)["'].*/$1/s; + (my $quoted = $_) =~ s/^.*?["'](.*?)["'].*/$1/s; # replace -* with -STAR for our convenience below $quoted =~ s/-\*/-STAR/; -- 2.26.2