source: gutenbach/inst/create-filter-config @ 04f7e05

debianmacno-cupsweb
Last change on this file since 04f7e05 was 04f7e05, checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago

Move debian folder into the root, and move all non-debian code into gutenbach/

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/bin/sh -e
2
3echo "Creating /usr/lib/gutenbach/config/gutenbach-filter-config.pl..." >&2
4if [ -e "/usr/lib/gutenbach/config/gutenbach-filter-config.pl" ]; then
5    rm /usr/lib/gutenbach/config/gutenbach-filter-config.pl
6fi
7
8failed=
9if [ -e /usr/lib/gutenbach/config/printername ]; then
10    printername=$(cat /usr/lib/gutenbach/config/printername)
11else
12    failed="yes"
13fi
14if [ -e /usr/lib/gutenbach/config/hostname ]; then
15    hostname=$(cat /usr/lib/gutenbach/config/hostname)
16else
17    failed="yes"
18fi
19if [ -e /usr/lib/gutenbach/config/zephyrclass ]; then
20    zephyrclass=$(cat /usr/lib/gutenbach/config/zephyrclass)
21else
22    failed="yes"
23fi
24
25mixer="PCM"
26channel="Front Left"
27config_file="/usr/lib/gutenbach/config/gutenbach-filter-config.pl"
28
29if [ -z "$failed" ]; then
30    echo "\$zephyr_class = \""$zephyrclass"\";" >> "$config_file"
31    echo "\$host = \""$hostname"\";" >> "$config_file"
32    echo "\$queue = \""$printername"\";" >> "$config_file"
33    echo "\$mixer = \""$mixer"\";" >> "$config_file"
34    echo "\$channel = \""$channel"\";" >> "$config_file"
35    echo "1;" >> "$config_file"
36else
37    echo "Error: One of /usr/lib/gutenbach/config/{printername,hostname,zephyrclass} does not exist!" >&2
38    exit 1
39fi
Note: See TracBrowser for help on using the repository browser.