source:
gutenbach/debian/lib/gutenbach-get-config
@
a33a064
Last change on this file since a33a064 was a33a064, checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago | |
---|---|
|
|
File size: 685 bytes |
Rev | Line | |
---|---|---|
[d988d9d] | 1 | #!/usr/bin/perl |
[b1d66d4] | 2 | use strict; |
[2e8b589] | 3 | # Get configuration of gutenbach |
[b1d66d4] | 4 | |
[a33a064] | 5 | my $zephyr_class = `hostname`; |
6 | chomp($zephyr_class); | |
[32b323f] | 7 | my $host = `hostname`; |
[a33a064] | 8 | chomp($zephyr_class); |
[2e8b589] | 9 | my $queue = "gutenbach"; |
[a33a064] | 10 | my $mixer = "PCM"; |
[28836c2] | 11 | my $channel = "Front Left"; |
[b1d66d4] | 12 | |
13 | # Configuration | |
[a33a064] | 14 | my $config_file = "/usr/lib/gutenbach/config/gutenbach-filter-config.pl"; |
[b1d66d4] | 15 | if (-r $config_file) { |
16 | # Inline the configuration file | |
17 | local $/; | |
18 | my $fh; | |
19 | open $fh, $config_file; | |
20 | eval <$fh>; | |
21 | } | |
22 | ||
23 | my %config = ( | |
24 | 'zephyr-class' => $zephyr_class, | |
25 | 'host' => $host, | |
26 | 'queue' => $queue, | |
[28836c2] | 27 | 'mixer' => $mixer, |
[32b323f] | 28 | 'channel' => $channel, |
[b1d66d4] | 29 | ); |
30 | ||
31 | foreach my $argv (@ARGV) | |
32 | { | |
33 | #print $argv . "\n"; | |
34 | print $config{$argv}; | |
35 | } |
Note: See TracBrowser
for help on using the repository browser.