source:
debian/lib/gutenbach-get-config
@
5a05bf2
| Last change on this file since 5a05bf2 was 5a05bf2, checked in by Jessica B. Hamrick <jhamrick@…>, 16 years ago | |
|---|---|
|
|
| File size: 688 bytes | |
| Rev | Line | |
|---|---|---|
| [d988d9d] | 1 | #!/usr/bin/perl |
| [b1d66d4] | 2 | use strict; |
| [2e8b589] | 3 | # Get configuration of gutenbach |
| [b1d66d4] | 4 | |
| [5a05bf2] | 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 = ( | |
| [5a05bf2] | 24 | # 'zephyr-class' => $zephyr_class, |
| [b1d66d4] | 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.
