Changeset 7cdd65d for client/bin/gbrm


Ignore:
Timestamp:
Aug 14, 2010, 9:30:39 PM (14 years ago)
Author:
Kyle Brogle <broglek@…>
Branches:
master, debian, mac, no-cups
Children:
618236b, 9dee329
Parents:
55b24d1
git-author:
Kyle Brogle <broglek@…> (08/14/10 21:30:39)
git-committer:
Kyle Brogle <broglek@…> (08/14/10 21:30:39)
Message:

Implemented default queue in client scripts.
Queue argument now optional for gb{r,rm,q}, and also takes form of -q QUEUE
now.

gutenbach-client-config -sset-default QUEUE will set default queue

Updated manpages accordingly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gbrm

    r335786f r7cdd65d  
    88use Net::CUPS;
    99use Net::CUPS::Destination;
     10use Getopt::Long;
    1011
    11 my $usage = "Usage: gbq QUEUE ID\n";
     12my $usage = "Usage: gbq [-q QUEUE] ID\n";
     13my $q = "";
     14GetOptions ('q|queue=s' => \$q);
    1215
    13 my $q = $ARGV[0];
    14 my @ids = @ARGV[1 .. $#ARGV];
     16my @ids = @ARGV[0 .. $#ARGV];
    1517
    16 if (!$q or !@ids) {
     18if (!$q){
     19    $q = "DEFAULT";
     20}
     21if (!@ids) {
    1722    print $usage;
    1823    exit 1
    1924}
     25
    2026
    2127my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
Note: See TracChangeset for help on using the changeset viewer.