Changeset 3635420


Ignore:
Timestamp:
Oct 2, 2010, 10:44:31 PM (14 years ago)
Author:
Jessica B. Hamrick <jhamrick@…>
Branches:
debian
Children:
28dc075
Parents:
e15b0b0 (diff), e83b2d7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jessica B. Hamrick <jhamrick@…> (10/02/10 22:44:31)
git-committer:
Jessica B. Hamrick <jhamrick@…> (10/02/10 22:44:31)
Message:

Merge branch 'master' into debian

Files:
31 added
7 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gbq

    r9dee329 rfc8707b  
    11#!/usr/bin/perl
    22
    3 # Written by Jessica Hamrick (C) 2010
     3# This script was largely written by Jessica Hamrick (jhamrick), with
     4# help from Kyle Brogle (broglek)
    45
    56use strict;
     
    1011use Getopt::Long;
    1112
    12 my $usage = "Usage: gbq [-q QUEUE]\n";
     13# usage
     14my $usage = <<USAGE;
     15Usage: gbq [options] [-q QUEUE]
    1316
     17        -q, --queue             Specify a queue other than the default
     18        -h, --help              Print this message
     19USAGE
     20
     21# initialize the variables for the options
    1422my $q = "";
    15 GetOptions ('q|queue=s' => \$q);
     23my $help = 0;
    1624
     25# parse the options
     26GetOptions ('q|queue=s' => \$q,
     27            'h|help' => \$help);
     28
     29# if the -h flag was passed, then print the usage and exit
     30if ($help) {
     31    print $usage;
     32    exit 0;
     33}
     34
     35# if the -q option is not specified, then assume we're using the
     36# default queue
    1737if (!$q) {
    1838    $q = "DEFAULT";
    1939}
    2040
     41# set configuration path, and complain if it doesn't exist
    2142my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
    2243if (! -e $configpath) {
     
    2546}
    2647
     48# initialize the host and queue variables: host holds the address for
     49# the machine on which the remote queue runs, and queue holds the name
     50# of the printer
    2751my ($host, $queue);
    2852
     53# load the configuration file (this will set $host and $queue)
    2954if (-r $configpath) {
    3055    local $/;
     
    3459}
    3560
     61# initialize a new CUPS session
    3662my $cups = Net::CUPS->new();
     63# set the server to the one specified in the config file
    3764$cups->setServer("$host");
     65# set the printer name to the one specified in the config file
    3866my $printer = $cups->getDestination("$queue");
    3967
     68# if $printer is not defined, then throw an error
    4069unless( $printer){
    4170    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
    4271    exit 1;
    4372}
     73
     74# print pretty headings and stuff
    4475print "Queue listing for queue '$queue' on '$host'\n\n";
    4576printf ("%-8s%-15s%s\n","Job","Owner","Title");
    4677print "-"x70 . "\n";
     78
     79# get the list of jobs from the printer
    4780my @jobs = $printer->getJobs(0, 0);
     81
     82# initialize the job reference and job id variables
    4883my ($job_ref, $jobid);
    4984
     85# for each job in the list of jobs:
    5086foreach $jobid(@jobs)
    5187{       
    52         $job_ref = $printer->getJob($jobid);
    53         my $id = $job_ref->{'id'};
    54         my $user = $job_ref->{'user'};
    55         my $title = $job_ref->{'title'};
     88    # get the reference to the job (so we can get various related
     89    # variables)
     90    $job_ref = $printer->getJob($jobid);
    5691
    57         printf ("%-8s%-15s%s\n","$id",substr("$user",0,15),substr("$title",0,47));
     92    # get the id of the job
     93    my $id = $job_ref->{'id'};
     94    # get the user who printed the job
     95    my $user = $job_ref->{'user'};
     96    # get the title of the job
     97    my $title = $job_ref->{'title'};
     98   
     99    # print the job information to the screen
     100    printf ("%-8s%-15s%s\n","$id",substr("$user",0,15),substr("$title",0,47));
    58101}
  • client/bin/gbq.1

    r7cdd65d re83b2d7  
    1 .TH gbq 1 "27 June 2010"
     1.TH gbq 1 "02 October 2010"
    22.SH NAME
    33gbq \- displays a remote Gutenbach queue
     
    99the current jobs, along with ID numbers, owners, and filenames.  The
    1010Gutenbach queue must have previously been added with
    11 .B gutenbach-client-config
    12 so that gbq knows which host to use.  If no queue is specified,
    13 .B gbq
    14 will try to use the default queue, if one is configured.
     11\fBgutenbach-client-config\fR so that gbq knows which host to use.  If
     12no queue is specified, \fBgbq\fR will try to use the default queue, if
     13one is configured.
     14.TP
     15\fB\-q\fR, \fB\-\-queue\fR
     16Specify a queue other than the default
     17.TP
     18\fB\-h\fR, \fB\-\-help\fR
     19Print the help message
    1520.SH SEE ALSO
    1621gbr(1), gbrm(1), gutenbach-client-config(1)
  • client/bin/gbr

    r600e713 r43ddb7a  
    11#!/usr/bin/perl
    22
    3 # Written by Jessica Hamrick (C) 2010
     3# This script was largely written by Jessica Hamrick (jhamrick), with
     4# help from Kyle Brogle (broglek)
    45
    56use strict;
     
    1011use Getopt::Long;
    1112use Image::ExifTool qw(ImageInfo);
     13use List::Util 'shuffle';
     14use File::Find;
    1215
    13 my $usage = "Usage: gbr QUEUE FILES\n";
     16# the usage for this script
     17my $usage = <<USAGE;
     18Usage: gbr [options] [-q QUEUE] FILES
    1419
     20        -q, --queue             Specify a queue other than the default
     21        -d, --dryrun            Just list what would be done
     22        -s, --shuffle           Randomize the order that the songs are queued in
     23        -r, --recursive         Recursively find files if a directory is passed in
     24        -n, --number NUMBER     Only print NUMBER files, if more than NUMBER are given
     25                                (this will print the first NUMBER files if -s is not given)
     26        -h, --help              Print this message
     27USAGE
     28
     29# initialize the variables for the options
    1530my $q = "";
    16 GetOptions ('q|queue=s' => \$q);
     31my $dryrun = 0;
     32my $help = 0;
     33my $shuffle = 0;
     34my $recursive = 0;
     35my $number = 0;
    1736
     37# parse the options
     38GetOptions ('q|queue=s' => \$q,
     39            'd|dryrun' => \$dryrun,
     40            'h|help' => \$help,
     41            's|shuffle' => \$shuffle,
     42            'r|recursive' => \$recursive,
     43            'n|number=i' => \$number);
     44
     45# if the -h flag was passed, then print the usage and exit
     46if ($help) {
     47    print $usage;
     48    exit 0;
     49}
     50
     51# get the files to print from the arguments
    1852my @files = @ARGV[0 .. $#ARGV];
     53my @allfiles;
    1954
     55# if the recursive flag was passed, then recursively find files
     56if ($recursive) {
     57
     58    # helper function to add a file to the end of the list, but only
     59    # if it is a file (and not a directory)
     60    sub append {
     61        my $name = $File::Find::name;
     62        if (-f $name) {
     63            push(@allfiles, $name);
     64        }
     65    }
     66   
     67    # recursively find all the files and add them to @allfiles
     68    find(\&append, @files);
     69
     70    # if we're not shuffling the list, then sort the files.  If we are
     71    # shuffling the list, then don't bother sorting (since we're going
     72    # to shuffle it anyway)
     73    unless ($shuffle) {
     74        @files = sort(@allfiles);
     75    } else {
     76        @files = @allfiles;
     77    }
     78}
     79
     80# if the shuffle flag was passed, then shuffle the order of the files
     81if ($shuffle) {
     82    @files = shuffle(@files);
     83}
     84
     85# if the number flag was specified, then only play the specified
     86# number of files
     87if ($number > 0 and $number < $#files) {
     88    @files = @files[0 .. $number-1]
     89}
     90
     91# if the -q option is not specified, then assume we're using the
     92# default queue
    2093if (!$q){
    2194    $q = "DEFAULT";
    2295}
     96
     97# if there are no files specified to print, then show the usage,
     98# because the user is Doing It Wrong
    2399if (!@files) {
    24100    print $usage;
     
    26102}
    27103
     104# set configuration path, and complain if it doesn't exist
    28105my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
    29106if (! -e $configpath) {
     
    32109}
    33110
     111# initialize the host and queue variables: host holds the address for
     112# the machine on which the remote queue runs, and queue holds the name
     113# of the printer
    34114my ($host, $queue);
    35115
     116# load the configuration file (this will set $host and $queue)
    36117if (-r $configpath) {
    37118    local $/;
     
    41122}
    42123
     124# initialize a new CUPS session
    43125my $cups = Net::CUPS->new();
     126# set the server to the one specified in the config file
    44127$cups->setServer("$host");
     128# set the printer name to the one specified in the config file
    45129my $printer = $cups->getDestination("$queue");
     130
     131# if $printer is not defined, then throw an error
    46132unless( $printer){
    47     print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
     133    print "Cannot access queue $q... do you have network connectivity and permission to view the queue?\n";
    48134    exit 1;
    49135}
     136
     137# initialize the job id and title variables for use below
    50138my ($jobid, $title);
    51139
     140# for each file that the user wants to print
    52141foreach my $file(@files) {
     142
     143    # check to see if the file is a youtube video.  If it is, then
     144    # write the URL to a temporary file, and set the number of copies
     145    # on the print job to 42 (this is the dirty hack we have in place
     146    # to indicate that the job is a youtube file instead of a normal
     147    # file)
    53148    if ($file =~ m|http://www\.youtube\.com/watch\?v=|) {
    54149        open FILE, ">", "/tmp/gutenbach-youtube" or die "Couldn't create temporary file";
     
    58153        $printer->addOption("copies", 42);
    59154    }
     155
     156    # otherwise, we assume it's a normal file.  Try to use exiftool's
     157    # ImageInfo to find out the tag information about the file (i.e.,
     158    # title, artist, and album).  If you can, then rename the job to
     159    # reflect those tags.  Otherwise, keep the normal title.
    60160    else {
    61161        my $fileinfo = ImageInfo($file);
     
    70170    }
    71171
    72     $jobid = $printer->printFile($file, $title);
    73    
    74     if ($jobid) {
    75         print "Sent job '$title' (id $jobid)\n";
    76     }
    77     else {
    78         print "Error sending job '$title'\n";
    79     }
     172    # unless it's a dry run, send the print job, given the file and
     173    # the job title
     174    unless ($dryrun) {
     175        $jobid = $printer->printFile($file, $title);
     176
     177        # if the printFile command returned a job id, then print that out
     178        # for the user to see
     179        if ($jobid) {
     180            print "Sent job '$title' (id $jobid)\n";
     181        }
     182
     183        # otherwise, let them know that an error occurred
     184        else {
     185            print "Error sending job '$title'\n";
     186        }
     187
     188    # otherwise, just print what we would do
     189    } else {
     190        print "Would send file '$file' with title '$title'\n";
     191    }   
    80192}
  • client/bin/gbr.1

    r7cdd65d re83b2d7  
    1 .TH gbr 1 "27 June 2010"
     1.TH gbr 1 "02 October 2010"
    22.SH NAME
    33gbr \- sends a file to a Gutenbach queue
    44.SH SYNOPSIS
    55.B gbr
    6 [-q \fIQUEUE\fR] \fIFILES\fR
     6[options] [-q \fIQUEUE\fR] \fIFILES\fR
    77.SH DESCRIPTION
    88Prints files to a Gutenbach queue, given the queue name and the path
    9 to the files.  gbr correctly handles pathname expansion, so (for
    10 example), if you wish to play all .mp3 files in a directory, the
    11 command `gbr $queue *.mp3` will send each .mp3 as a separate job.  The
    12 path may also be a URL to a
    13 .B YouTube
    14 video (e.g. http://www.youtube.com/watch?v=foo).  The Gutenbach queue
    15 must have previously been added with
    16 .B gutenbach-client-config
    17 so that gbr knows which host to use.  If no queue is specified,
    18 .B gbr
    19 will try to use the default queue, if one is configured.
     9to the files.  If no queue is specified with the \fB\-q\fR option,
     10then the default queue will be used (which should be specified with
     11\fBgutenbach-client-config\fR).  gbr correctly handles pathname
     12expansion, so (for example), if you wish to play all .mp3 files in a
     13directory, the command `gbr $queue *.mp3` will send each .mp3 as a
     14separate job.  The path may also be a URL to a \fBYouTube\fR video
     15(e.g. http://www.youtube.com/watch?v=foo).  The Gutenbach queue must
     16have previously been added with gutenbach-client-config so that gbr
     17knows which host to use.  If no queue is specified, gbr will try to
     18use the default queue, if one is configured.
     19.TP
     20\fB\-q\fR, \fB\-\-queue\fR
     21Specify a queue other than the default
     22.TP
     23\fB\-d\fR, \fB\-\-dryrun\fR
     24Just list what would be done
     25.TP
     26\fB\-s\fR, \fB\-\-shuffle\fR
     27Randomize the order that the songs are queued in
     28.TP
     29\fB\-r\fR, \fB\-\-recursive\fR
     30Recursively find files if a directory is passed in
     31.TP
     32\fB\-n\fR, \fB\-\-number\fR \fINUMBER\fR
     33Only print NUMBER files, if more than NUMBER are given (this will
     34print the first NUMBER files if -s is not given)
     35.TP
     36\fB\-h\fR, \fB\-\-help\fR
     37Print the help message
    2038.SH SEE ALSO
    2139gbq(1), gbrm(1), gutenbach-client-config(1)
  • client/bin/gbrm

    r7cdd65d rfc8707b  
    11#!/usr/bin/perl
    22
    3 # Written by Jessica Hamrick (C) 2010
     3# This script was largely written by Jessica Hamrick (jhamrick), with
     4# help from Kyle Brogle (broglek)
    45
    56use strict;
     
    1011use Getopt::Long;
    1112
    12 my $usage = "Usage: gbq [-q QUEUE] ID\n";
     13# usage
     14my $usage = <<USAGE;
     15Usage: gbq [options] [-q QUEUE] ID
     16
     17        -q, --queue             Specify a queue other than the default
     18        -h, --help              Print this message
     19USAGE
     20
     21# initialize the variables for the options
    1322my $q = "";
    14 GetOptions ('q|queue=s' => \$q);
     23my $help = 0;
     24
     25# parse the options
     26GetOptions ('q|queue=s' => \$q,
     27            'h|help', => \$help);
     28
     29# if the -h flag was passed, then print the usage and exit
     30if ($help) {
     31    print $usage;
     32    exit 0;
     33}
    1534
    1635my @ids = @ARGV[0 .. $#ARGV];
    1736
    18 if (!$q){
     37# if the -q option is not specified, then assume we're using the
     38# default queue
     39if (!$q) {
    1940    $q = "DEFAULT";
    2041}
     42
     43# if there are no ids specified to remove, then print the usage
    2144if (!@ids) {
    2245    print $usage;
     
    2447}
    2548
    26 
     49# set configuration path, and complain if it doesn't exist
    2750my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
    2851if (! -e $configpath) {
     
    3154}
    3255
     56# initialize the host and queue variables: host holds the address for
     57# the machine on which the remote queue runs, and queue holds the name
     58# of the printer
    3359my ($host, $queue);
    3460
     61# load the configuration file (this will set $host and $queue)
    3562if (-r $configpath) {
    3663    local $/;
     
    4067}
    4168
     69# initialize a new CUPS session
    4270my $cups = Net::CUPS->new();
     71# set the server to the one specified in the config file
    4372$cups->setServer("$host");
     73# set the printer name to the one specified in the config file
    4474my $printer = $cups->getDestination("$queue");
     75
     76# if $printer is not defined, then throw an error
    4577unless( $printer){
    4678    print "Cannot access queue $q...do you have network connectivity and permission to view the queue?\n";
    4779    exit 1;
    4880}
     81
     82# get the list of jobs from the printer
    4983my @jobs = $printer->getJobs(0, 0);
     84
     85# for each id that we want to remove
    5086foreach my $id(@ids){
    51 if ($id eq "all") {
    52     foreach $id(@jobs) {
     87
     88    # if the id is 'all', then we remove all jobs
     89    if ($id eq "all") {
     90        foreach $id(@jobs) {
     91            cancel_job($id, $printer);
     92        }
     93    }
     94
     95    # if the id is 'current', then we remove just the currently
     96    # playing job
     97    elsif ($id eq "current") {
     98        $id = $jobs[0];
    5399        cancel_job($id, $printer);
    54100    }
    55 }
    56 elsif ($id eq "current") {
    57     $id = $jobs[0];
    58     cancel_job($id, $printer);
    59 }
    60 elsif ($id eq "last") {
    61     $id = $jobs[-1];
    62     cancel_job($id, $printer);
    63 }
    64 else {
    65     foreach my $item(@jobs) {
    66         if($item =~ /$id/){
    67             cancel_job($item, $printer);
     101
     102    # if the id is 'last', then we remove just the last job
     103    elsif ($id eq "last") {
     104        $id = $jobs[-1];
     105        cancel_job($id, $printer);
     106    }
     107
     108    # otherwise, remove the job based on its actual (numeric) id
     109    else {
     110        foreach my $item(@jobs) {
     111            if($item =~ /$id/){
     112                cancel_job($item, $printer);
     113            }
    68114        }
    69115    }
    70116}
    71 }
    72117
     118# helper function to remove a job
    73119sub cancel_job {
     120    # get the id and printer from the arguments
    74121    my ($id, $printer) = @_;
     122    # get the reference to the job
    75123    my $job_ref = $printer->getJob($id);
     124    # find the job title (so we can print it out for the user)
    76125    my $title = $job_ref->{'title'};
     126    # cancel the job
    77127    $printer->cancelJob($id);
    78128
     129    # print out that we canceled the job
    79130    print "Canceled job '$title' (id $id)\n";
    80  
    81131}
  • client/bin/gbrm.1

    r7cdd65d re83b2d7  
    1 .TH gbrm 1 "27 June 2010"
     1.TH gbrm 1 "02 October 2010"
    22.SH NAME
    33gbrm \- removes jobs from a Gutenbach queue
     
    77.SH DESCRIPTION
    88Removes a single job from a Gutenbach queue, given the job id, which
    9 can be obtained with the
    10 .B gbq
    11 command.  If
    12 .B all
    13 is used in place of an id, then all jobs are removed from the queue.  If
    14 .B current
    15 is used in place of an id, then the current (top) job is removed from
    16 the queue.  If
    17 .B last
    18 is used in place of an id, then the last job is removed from the
    19 queue.  The queue must have previously been added with
    20 .B gutenbach-client-config
    21 so that gbrm knows which host to use.  If no queue is specified,
    22 .B gbr
    23 will try to use the default queue, if one is configured.
     9can be obtained with the \fBgbq\fR command.  If no queue is specified
     10with the \fB\-q\fR option, then the default queue will be used (which
     11should be specified with \fBgutenbach-client-config\fR).  If \fBall\fR
     12is used in place of an id, then all jobs are removed from the queue.
     13If \fBcurrent\fR is used in place of an id, then the current (top) job
     14is removed from the queue.  If \fBlast\fR is used in place of an id,
     15then the last job is removed from the queue.  The queue must have
     16previously been added with gutenbach-client-config so that gbrm knows
     17which host to use.
     18.TP
     19\fB\-q\fR, \fB\-\-queue\fR
     20Specify a queue other than the default
     21.TP
     22\fB\-h\fR, \fB\-\-help\fR
     23Print the help message
    2424.SH SEE ALSO
    2525gbr(1), gbq(1), gutenbach-client-config(1)
  • client/bin/gutenbach-client-config

    r7cdd65d rfc8707b  
    11#!/usr/bin/perl
    22
    3 # Written by Jessica Hamrick, (C) 2010
     3# This script was largely written by Jessica Hamrick (jhamrick), with
     4# help from Kyle Brogle (broglek)
    45
    56use strict;
     
    78use Getopt::Long;
    89
    9 my $usage =
    10     "Usage: gutenbach-client-config [-l|--list|-a|--add|-d|--delete] [QUEUE] [--host=HOST]\n" .
    11     "\n" .
    12     "\t-l, --list\t\tList available queues\n" .
    13     "\t-a, --add QUEUE\t\tAdd a queue (must be used with -h)\n" .
    14     "\t-d, --delete QUEUE\tDelete a queue)\n" .
    15     "\t-h, --host HOST\t\tHostname for the queue\n";
     10# the usage for the program
     11my $usage = <<USAGE;
     12Usage: gutenbach-client-config [options]
    1613
     14        -l, --list              List available queues
     15        -a, --add QUEUE         Add a queue (must be used with -h)
     16        -d, --delete QUEUE      Delete a queue
     17        -s, --set-default QUEUE Set the default queue
     18        -h, --host HOST         Hostname for the queue (must be used with -a)
     19        -H, --help              Print this message
     20USAGE
     21
     22# initialize the variables that will hold the arguments
    1723my $list = 0;
    1824my $add = "";
     
    2026my $host = "";
    2127my $default = "";
     28my $help = 0;
    2229
     30# get the options from the command line
    2331GetOptions ('l|list' => \$list,
    2432            's|set-default=s' => \$default,
    2533            'a|add=s' => \$add,
    2634            'd|delete=s' => \$delete,
    27             'h|host=s' => \$host);
     35            'h|host=s' => \$host,
     36            'H|help' => \$help);
    2837
     38# if the -H flag was passed, then print the usage and exit
     39if ($help) {
     40    print $usage;
     41    exit 0;
     42}
     43
     44# set the path where the configuration files live
    2945my $configpath = "$ENV{'HOME'}/.gutenbach";
    3046
     47# if the configuration path doens't exist, then make it
    3148if (! -e $configpath) {
    3249    mkdir "$configpath";
    3350}
    34 #set given queue to default
     51
     52# if the 'default' option was specified, then set given queue to
     53# default
    3554if($default and !$add and !$delete and !$list) {
     55    # if the specified queue doesn't exist, then throw an error
    3656    unless(-e "$configpath/$default") {
    3757        print "Error: queue '$default' doesn't exist yet...you should add it first.\n";
    3858        exit 1;
    3959    }
     60   
     61    # if there already exists a default, then remove it so we can
     62    # replace it with the new default
    4063    if( -e "$configpath/DEFAULT"){
    4164        unlink("$configpath/DEFAULT") or die "Couldn't remove config file '$configpath/DEFAULT'";
    4265    }
     66
     67    # check to make sure we can create symlinks
    4368    my $symlink_exists = eval { symlink("",""); 1 };
     69
     70    # if so, then create the symlink and report it
    4471    if ($symlink_exists){
    4572        symlink("$configpath/$default","$configpath/DEFAULT");
    4673        print "Changed default queue to $default.\n";
    4774    }
     75
     76    # otherwise, throw an error
    4877    else
    4978    {
     
    5281    }
    5382}
    54    
    55        
    5683
    57 # list the existing queues
     84# if the 'list' option was specified, then list the existing queues
    5885elsif ($list and !$add and !$delete and !$default) {
     86    # get the config files in the configuration path -- these are the queues
    5987    my @queues = glob("$configpath/*") or die "Couldn't find configuration files at '$configpath'";
    6088
     89    # for each of the queues, load the configuration file and print
     90    # the queue name and the host it's on
    6191    print "Queue\t\tHost\n";
    6292    foreach my $q (@queues) {
     
    74104}
    75105
    76 # add a new queue
     106# if the 'add' option was specified, then add a new queue
    77107elsif (!$list and $add and !$delete) {
     108
     109    # make sure there was a host specified as well (otherwise, we
     110    # won't know where to print to)
    78111    if (!$host) {
    79112        print $usage;
     
    81114    }
    82115
     116    # if the queue already exists, then print a warning
    83117    if (-e "$configpath/$add") {
    84118        print "Warning: queue '$add' already exists\n";
    85119    }
    86120
     121    # create the configuration file
    87122    open CONFIG, "> $configpath/$add" or die "Couldn't open config file '$configpath/$add'";
    88123    print CONFIG "\$host = \"$host\";\n";
     
    93128}
    94129
    95 # delete an existing queue
     130# if the 'delete' option was specified, then delete an existing queue
    96131elsif (!$list and !$add and $delete) {
     132
     133    # if the queue doesn't exist, then print an error and exit
    97134    if (! -e "$configpath/$delete") {
    98         print "Error: queue '$delete' already exists\n";
     135        print "Error: queue '$delete' does not exist\n";
    99136        exit 1;
    100137    }
    101138
     139    # otherwise, remove the configuration file
    102140    unlink("$configpath/$delete") or die "Couldn't remove config file '$configpath/$delete'";
    103141}
    104142
     143# otherwise, it's an unrecognized option, so print the usage and exit
    105144else {
    106145    print $usage;
  • client/bin/gutenbach-client-config.1

    r7cdd65d re83b2d7  
    1 .TH gutenbach-client-config 1 "27 June 2010"
     1.TH gutenbach-client-config 1 "02 October 2010"
    22.SH NAME
    33gutenbach-client-config \- displays a remote Gutenbach queue
    44.SH SYNOPSIS
    55.B gutenbach-client-config
    6 [-l|--list|-a|--add|-d|--delete|-s|--set-default] [\fIQUEUE\fR] [--host \fIHOST\fR]
     6[options]
    77.SH DESCRIPTION
    88Provides options to add, remove, or list remote Gutenbach queues.  The
     
    2525\fB\-a\fR, \fB\-\-add\fR QUEUE
    2626Add a remote queue.  Must be used in conjunction with
    27 .B --host
     27.B \fB\-\-host\fR
    2828.TP
    29 \fB\-d\fR, \fB\-\-delete\fR QUEUE
    30 Delete a remote queue.  Must be used in conjunction with
    31 .B --host
    32 .
     29\fB\-d\fR, \fB\-\-delete\fR QUEUE Delete a remote queue.
     30.TP
     31\fB\-s\fR, \fB\-\-set\-default\fR QUEUE
     32Set the default queue
    3333.TP
    3434\fB\-h\fR, \fB\-\-host\fR HOST
    3535Hostname for the queue
    3636.TP
    37 \fB\-s\fR, \fB\-\-set\-default\fR QUEUE
    38 Set the default queue
     37\fB\-H\fR, \fB\-\-help\fR
     38Print a help message
    3939.SH SEE ALSO
    4040gbr(1), gbrm(1), gbq(1)
  • remctl/lib/gutenbach/volume-helper.py

    rbbede33 r86f0b5b  
    2727        v = getVolume()
    2828        newV = percent
    29         for i in range(10):
     29        for i in range(10+1):
    3030                frac = i/10
    3131                tempV = int(v + (newV-v)*frac)
  • .gitignore

    rb58aada r1d7e681  
    11*~
     2debian/files
     3debian/*.debhelper
     4debian/*.substvars
     5debian/*.debhelper.log
     6debian/gutenbach/
     7debian/gutenbach-client/
     8debian/gutenbach-queue/
     9debian/gutenbach-remctl/
     10debian/gutenbach-server/
     11debian/stamp-makefile-build
     12debian/tmp/
    213client/bin/*.1.gz
    3 debian/
  • Makefile

    r9c0279e r2116615  
    55install:
    66        for d in $(DIRS); do (cd $$d; $(MAKE) install); done
     7clean:
     8        for d in $(DIRS); do (cd $$d; $(MAKE) clean); done
Note: See TracChangeset for help on using the changeset viewer.