summaryrefslogtreecommitdiff
path: root/bin/masonize
diff options
context:
space:
mode:
Diffstat (limited to 'bin/masonize')
-rwxr-xr-xbin/masonize6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/masonize b/bin/masonize
index 3139e0af5..475c9a6bf 100755
--- a/bin/masonize
+++ b/bin/masonize
@@ -1,7 +1,6 @@
#!/usr/bin/perl
-foreach $file ( split(/\n/, `find . -depth -print`) ) {
- next unless $file =~ /(cgi|html)$/;
+foreach $file ( split(/\n/, `find . -depth -print | grep cgi\$`) ) {
open(F,$file) or die "can't open $file for reading: $!";
@file = <F>;
#print "$file ". scalar(@file). "\n";
@@ -9,7 +8,6 @@ foreach $file ( split(/\n/, `find . -depth -print`) ) {
system("chmod u+w $file");
open(W,">$file") or die "can't open $file for writing: $!";
select W; $| = 1; select STDOUT;
- $newline = ''; #avoid prepending extraneous newlines
$all = join('',@file);
$mode = 'html';
@@ -28,7 +26,7 @@ foreach $file ( split(/\n/, `find . -depth -print`) ) {
#die;
next;
} elsif ( $all =~ /^<%(.*)$/s ) {
- print W $newline; $newline = "\n";
+ print W "\n";
$all = $1;
$mode = 'perlc';
next;