Make count_lines work with the new directory layout
authorIan Lynagh <igloo@earth.li>
Wed, 23 Sep 2009 18:22:51 +0000 (18:22 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 23 Sep 2009 18:22:51 +0000 (18:22 +0000)
utils/count_lines/count_lines

index ad5aa52..1e0942c 100644 (file)
@@ -1,14 +1,18 @@
 #! /usr/bin/perl
-#
+
+use FindBin;
+
 %DirCount = ();
 %ModCount = ();
 %DirComments = ();
 %ModComments = ();
 
+my $binPath = $FindBin::Bin;
+
 foreach $f ( @ARGV ) {
 
     if ( $f =~ /\.lhs$/ ) {
-        open(INF, "../utils/unlit/unlit $f - |") || die "Couldn't unlit $f!\n";
+        open(INF, "$binPath/../../inplace/lib/unlit $f - |") || die "Couldn't unlit $f!\n";
     } else {
         open(INF, "< $f") || die "Couldn't open $f!\n";
     }