chiark / gitweb /
evade-mail-pregen: fix usage message
[d.git] / evade-mail-pregen
index 9ab3d220747af761e09e5617e40e235f492baf6a..be5c895ac0cf6452a7e9473f89611071eec0bc8b 100755 (executable)
@@ -2,10 +2,10 @@
 use strict;
 use Carp;
 our $us = $0; $us =~ s#.*/##;
-our $usage = <<'END';
+our $usage = <<END;
 usage:
- $us [<opts>] update <number>|<localpart>@[domain] [<reason>] [<comment>]
- $us [<opts>] assign <number>|<localpart>@[domain] <comment>
+ $us [<opts>] update <number>|<localpart>\@[domain] [<reason>] [<comment>]
+ $us [<opts>] assign <number>|<localpart>\@[domain] <comment>
  $us [<opts>] list
  $us [<opts>] some <count>                     } will generate aliases
  $us [<opts>] range <min>-<max>|<min>+<count>  }  as necessary
@@ -252,7 +252,10 @@ $comment_re =~ s/\W/\\$&/g;
     or badusage "comment pattern (\`$comment_pattern')".
          " must contain \`<number>' exactly once";
 
-@ARGV or badusage "missing action";
+if (!@ARGV) {
+    print STDERR $usage or die $!;
+    exit 1;
+}
 my $action = shift @ARGV;
 
 fetch_list();