debianmacno-cupsweb
Last change
on this file since f0a76cc was
78eb866c,
checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago
|
Added gbq, a queueing script for gutenbach
Updated control to require CUPS perl bindings
|
-
Property mode set to
100755
|
File size:
480 bytes
|
Line | |
---|
1 | #!/usr/bin/perl |
---|
2 | |
---|
3 | # Written by Jessica Hamrick (C) 2010 |
---|
4 | |
---|
5 | use strict; |
---|
6 | use warnings; |
---|
7 | |
---|
8 | my $usage = "Usage: gbr QUEUE FILE\n"; |
---|
9 | |
---|
10 | my $q = $ARGV[0]; |
---|
11 | my $file = $ARGV[1]; |
---|
12 | |
---|
13 | if (!$q or !$file) { |
---|
14 | print $usage; |
---|
15 | exit 1 |
---|
16 | } |
---|
17 | |
---|
18 | my $configpath = "$ENV{'HOME'}/.gutenbach/$q"; |
---|
19 | my ($host, $queue); |
---|
20 | |
---|
21 | if (-r $configpath) { |
---|
22 | local $/; |
---|
23 | my $fh; |
---|
24 | open $fh, $configpath; |
---|
25 | eval <$fh>; |
---|
26 | } |
---|
27 | |
---|
28 | my @args = ("lp", "-h$host", "-d$queue", "$file"); |
---|
29 | exec (@args) or die "Couldn't execute lp command"; |
---|
Note: See
TracBrowser
for help on using the repository browser.