source: server/inst/create-filter-config @ 335786f

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

Remove "gutenbach-" from directory names and rename "gutenbach" to "gutenbach-server"

  • 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.