source: gutenbach/debian/inst/create-filter-config @ 9a301c8

debianmacno-cupsnodebathenaweb
Last change on this file since 9a301c8 was 9a301c8, checked in by Jessica Hamrick <jhamrick@…>, 14 years ago

Revert "Remove submodules and do a little restructuring"

This reverts commit fcff7cd7dfaee2a199339113dfc3c1b7ad759983.

  • Property mode set to 100755
File size: 1.3 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"
27
28if [ -z "$failed" ]; then
29    echo "\$zephyr_class = \""$zephyrclass"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
30    echo "\$host = \""$hostname"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
31    echo "\$queue = \""$printername"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
32    echo "\$mixer = \""$mixer"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
33    echo "\$channel = \""$channel"\";" >> /usr/lib/gutenbach/config/gutenbach-filter-config.pl
34else
35    echo "Error: One of /usr/lib/gutenbach/config/{printername,hostname,zephyrclass} does not exist!" >&2
36    exit 1
37fi
Note: See TracBrowser for help on using the repository browser.