1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 11:43:15 +02:00

* This may be useful in the future.

This commit is contained in:
Eelco Dolstra 2006-05-31 09:24:54 +00:00
parent 1390ce4142
commit 04cf72287b
3 changed files with 21 additions and 2 deletions

17
scripts/readconfig.pm.in Normal file
View 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;