* [PATCH] public-inbox-index: exit with usage if not given an arg
@ 2015-08-18 3:17 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-08-18 3:17 UTC (permalink / raw)
To: meta
I often forget how to use this myself :x
---
public-inbox-index | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/public-inbox-index b/public-inbox-index
index 2fcf562..1104bbc 100755
--- a/public-inbox-index
+++ b/public-inbox-index
@@ -17,11 +17,11 @@ if ($@) {
}
sub usage { print STDERR "Usage: $usage\n"; exit 1 }
-if (@ARGV) {
- foreach my $dir (@ARGV) {
- index_dir($dir);
- }
-};
+usage() unless @ARGV;
+
+foreach my $dir (@ARGV) {
+ index_dir($dir);
+}
sub index_dir {
my ($git_dir) = @_;
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-18 3:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18 3:17 [PATCH] public-inbox-index: exit with usage if not given an arg Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).