aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Georg Gleditsch <argggh@lxr.linpro.no>2008-01-25 13:37:03 +0100
committerArne Georg Gleditsch <argggh@lxr.linpro.no>2008-01-25 13:37:03 +0100
commitf5277f0a49bfb6eb48c27de4d644b2f9e2f94e4f (patch)
tree08afd3a824409215e270ca150a57de4972d8a9e0
parent42deb3c4599e745d9000b5684b408e02ddce987a (diff)
Minor script to query config files.
-rwxr-xr-xlxr-stat30
1 files changed, 30 insertions, 0 deletions
diff --git a/lxr-stat b/lxr-stat
new file mode 100755
index 0000000..e77a19d
--- /dev/null
+++ b/lxr-stat
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Getopt::Long;
+
+use LXRng ROOT => $FindBin::Bin;
+use LXRng::Context;
+
+my $trees = 0;
+
+GetOptions("trees" => \$trees)
+ or die "Failed to parse options";
+
+my @configs = LXRng::Context->read_config();
+
+die("Unable to parse config")
+ unless ref($configs[0]) eq 'HASH';
+
+if ($trees) {
+ print(map { "$_\n" } sort keys %{$configs[0]});
+}
+
+
+#use Data::Dumper;
+#warn Dumper(\@configs);