diff options
Diffstat (limited to 'ssg')
-rwxr-xr-x | ssg | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -161,7 +161,7 @@ sub run_on { # 3) die if the output file is in the input directory. next if $outfile eq $mddir; next if $outfile =~ m/(\.|\.\.)($|\/)/; - $outfile =~ s/^$indir/$outdir/g; + $outfile =~ s/^$indir/$outdir\//g; $outfile !~ m/^$indir/ or die "trying to write in the same directory $outfile"; if($file->is_dir()) { @@ -172,7 +172,8 @@ sub run_on { } $outfile =~ s/md$/html/g; - print STDERR "* writing: $outfile\n"; + # This file it's just for pretty print + print STDERR "* writing: " . file($outfile) . "\n"; my $contents = generate_page $file; open FD, ">$outfile" or die " [ERROR] cannot open > $outfile: $!";; @@ -186,7 +187,7 @@ sub run_on { my %opts = ( 'v' => 0, 'h' => 0, - 'o' => "site.static" + 'o' => "site.static/" ); getopts('vho:', \%opts); $indir = shift @ARGV; |