From: Mark Wooding Date: Thu, 26 Nov 2015 15:25:58 +0000 (+0000) Subject: bin/pastebin.userv: Correct usage and parsing for the `update' command. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/odin-cgi/commitdiff_plain/98984c9d2db5bc19f73b28aa277a40608a935b22?ds=sidebyside bin/pastebin.userv: Correct usage and parsing for the `update' command. --- diff --git a/bin/pastebin.userv b/bin/pastebin.userv index c45d4e6..fd263bd 100755 --- a/bin/pastebin.userv +++ b/bin/pastebin.userv @@ -97,8 +97,9 @@ EOF else { $op->unk; } } @ARGV = $op->rest; - $op->bad if @ARGV; - $op->ok or Odin::fail "usage: new [-l LANG] [-t TITLE]"; + $op->bad if @ARGV != 1; + $op->ok or Odin::fail "usage: update [-c] [-l LANG] [-t TITLE] TAG"; + my $tag = shift @ARGV; $p{content} = read_content if $contentp; Odin::update_pastebin $tag, undef, %p or Odin::fail "nothing changed"; } else {