Ignore:
Timestamp:
Oct 2, 2010, 9:20:02 PM (14 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
master, debian, mac, no-cups
Children:
a5cf43b
Parents:
6b7441a
git-author:
Jessica B. Hamrick <jhamrick@…> (10/02/10 21:20:02)
git-committer:
Jessica B. Hamrick <jhamrick@…> (10/02/10 21:20:02)
Message:
Add '-hhelp' flags to all the client scripts
Add a '-ddryrun' option to gbr, to just list what would be done instead of doing it
File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gutenbach-client-config

    r6b7441a rfc8707b  
    1010# the usage for the program
    1111my $usage = <<USAGE;
    12 Usage: gutenbach-client-config [-l|--list|-a|--add|-d|--delete] [QUEUE] [--host=HOST]
     12Usage: gutenbach-client-config [options]
    1313
    1414        -l, --list              List available queues
     
    1616        -d, --delete QUEUE      Delete a queue
    1717        -s, --set-default QUEUE Set the default queue
    18         -h, --host HOST         Hostname for the queue
     18        -h, --host HOST         Hostname for the queue (must be used with -a)
     19        -H, --help              Print this message
    1920USAGE
    2021
     
    2526my $host = "";
    2627my $default = "";
     28my $help = 0;
    2729
    2830# get the options from the command line
     
    3133            'a|add=s' => \$add,
    3234            'd|delete=s' => \$delete,
    33             'h|host=s' => \$host);
     35            'h|host=s' => \$host,
     36            'H|help' => \$help);
     37
     38# if the -H flag was passed, then print the usage and exit
     39if ($help) {
     40    print $usage;
     41    exit 0;
     42}
    3443
    3544# set the path where the configuration files live
Note: See TracChangeset for help on using the changeset viewer.