From de28d009a53dfcf317a6f60c2b07a3252b58918d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 15 Feb 2012 22:40:40 +0100 Subject: [PATCH] Updated command usage --- bex | 17 ++++++++++++++++- lib/bin/add | 2 +- lib/bin/job | 2 +- lib/bin/ls | 2 +- lib/bin/prun | 2 +- lib/bin/queue | 2 +- lib/bin/run | 2 +- 7 files changed, 22 insertions(+), 7 deletions(-) diff --git a/bex b/bex index ac89512..faf9de7 100755 --- a/bex +++ b/bex @@ -14,7 +14,21 @@ GetOptions( "home=s" => \$bex_home, "lib=s" => \$bex_lib, "help" => sub { - print "Usage: brum\n"; + print < + +General options: +--home= Home directory where all queues and config files reside +--lib= Directory where BEX modules are installed + +Commands (and aliases): +add (a) Add new jobs to a queue +job Operations on queued jobs +ls List known machines and groups +prun (pr) Parallel version of `run' +queue (q) Show queues and jobs +run (r) Run queued jobs +AMEN exit 0; }, "version" => sub { @@ -36,6 +50,7 @@ $sub =~ /^[0-9a-zA-Z]+$/ or die "Invalid subcommand $sub\n"; my %aliases = ( 'a' => 'add', + 'p' => 'prun', 'q' => 'queue', 'r' => 'run', ); diff --git a/lib/bin/add b/lib/bin/add index 95fbbb8..7483ea8 100755 --- a/lib/bin/add +++ b/lib/bin/add @@ -25,7 +25,7 @@ GetOptions( "s|subject=s" => \$given_subject, "t|template=s" => \$given_template, ) or die <] [!] ... +Usage: bex add [] [!] ... Options: -b, --body= Load job body from the given file diff --git a/lib/bin/job b/lib/bin/job index 133ab99..11e8e11 100755 --- a/lib/bin/job +++ b/lib/bin/job @@ -14,7 +14,7 @@ GetOptions( "e|edit!" => \$edit, "q|queue=s" => \$queue_name, ) && @ARGV == 1 or die <] +Usage: bex job [] Options: -e, --edit Run editor on the given job (no locking) diff --git a/lib/bin/ls b/lib/bin/ls index e572057..542835c 100755 --- a/lib/bin/ls +++ b/lib/bin/ls @@ -12,7 +12,7 @@ my $queue_name; GetOptions( ) && @ARGV == 0 or die <] +Usage: bex job [] Options: None defined so far. diff --git a/lib/bin/prun b/lib/bin/prun index 8a04559..ba17cd4 100755 --- a/lib/bin/prun +++ b/lib/bin/prun @@ -18,7 +18,7 @@ GetOptions( "session=s" => \$screen_session, "text!" => \$text_mode, ) or die <] [[!] ...] +Usage: bex prun [] [[!] ...] Options: -q, --queue= Run jobs in the given queue diff --git a/lib/bin/queue b/lib/bin/queue index aec067d..2399519 100755 --- a/lib/bin/queue +++ b/lib/bin/queue @@ -24,7 +24,7 @@ GetOptions( "j|job=s" => \$given_job, "q|queue=s" => \$queue_name, ) or die <] [[!] ...] +Usage: bex queue [] [[!] ...] Actions: --by-job Show jobs sorted by job ID (default) diff --git a/lib/bin/run b/lib/bin/run index eb54c9a..f90c96f 100755 --- a/lib/bin/run +++ b/lib/bin/run @@ -16,7 +16,7 @@ GetOptions( "q|queue=s" => \$queue_name, "s|status-fifo=s" => \$status_fifo, ) or die <] [[!] ...] +Usage: bex run [] [[!] ...] Options: -j, --job= Run only the specified job -- 2.39.5