From 99510fa0c5a1c5b8c66e95f58aa5ee9c497e766c Mon Sep 17 00:00:00 2001 From: vapier Date: Wed, 7 Jan 2009 05:35:04 +0000 Subject: [PATCH] Error out on invalid arguments #156827 svn path=/; revision=533 --- trunk/src/ekeyword/ChangeLog | 1 + trunk/src/ekeyword/ekeyword | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/trunk/src/ekeyword/ChangeLog b/trunk/src/ekeyword/ChangeLog index 0847dcf..91a066c 100644 --- a/trunk/src/ekeyword/ChangeLog +++ b/trunk/src/ekeyword/ChangeLog @@ -1,6 +1,7 @@ 07 Jan 2009 Mike Frysinger * Support intended KEYWORDS * Convert every instance of KEYWORDS in the file + * Error out on invalid arguments #156827 27 Oct 2005 Aron Griffis * Fix handling of comments diff --git a/trunk/src/ekeyword/ekeyword b/trunk/src/ekeyword/ekeyword index 1f85996..9db2abe 100755 --- a/trunk/src/ekeyword/ekeyword +++ b/trunk/src/ekeyword/ekeyword @@ -27,6 +27,7 @@ for my $a (@ARGV) { die "I don't understand $a\n"; } +my $files = 0; for my $f (@ARGV) { if ($f =~ /$kw_re/o) { push @kw, $f; @@ -109,6 +110,11 @@ for my $f (@ARGV) { system "diff $f $f.new | grep -v '^[0-1]'"; rename "$f.new", "$f" or die "Can't rename: $!\n"; + $files++; +} + +if ($files == 0) { + die "No ebuilds processed!"; } # vim:ts=8 sw=4 -- 2.26.2