mirror of
https://github.com/NixOS/nix
synced 2025-06-29 10:31:15 +02:00
* Use CamelCase for the Perl modules.
This commit is contained in:
parent
f42a505ab7
commit
365f3028dd
12 changed files with 18 additions and 19 deletions
17
scripts/NixConfig.pm.in
Normal file
17
scripts/NixConfig.pm.in
Normal file
|
@ -0,0 +1,17 @@
|
|||
use strict;
|
||||
|
||||
sub readConfig {
|
||||
my %config;
|
||||
my $config = "@sysconfdir@/nix/nix.conf";
|
||||
return unless -f $config;
|
||||
|
||||
open CONFIG, "<$config" or die "cannot open `$config'";
|
||||
while (<CONFIG>) {
|
||||
/^\s*([\w|-]+)\s*=\s*(.*)$/ or next;
|
||||
$config{$1} = $2;
|
||||
print "|$1| -> |$2|\n";
|
||||
}
|
||||
close CONFIG;
|
||||
}
|
||||
|
||||
return 1;
|
Loading…
Add table
Add a link
Reference in a new issue