|
@@ -40,16 +40,16 @@ sub write_root_index($$$$) {
|
|
my $logger = shift;
|
|
my $logger = shift;
|
|
write_file("", $index);
|
|
write_file("", $index);
|
|
append_file("<html><body><b>Git Projects</b><br><head><META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\"></head>\n",$index);
|
|
append_file("<html><body><b>Git Projects</b><br><head><META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, NOFOLLOW\"></head>\n",$index);
|
|
- append_file("<small><i>Statically generated web root for browsing this git server</i></small><br><hr/>",$index);
|
|
|
|
|
|
+ append_file("<small><i>Statically generated web root for browsing this git server</i></small><br><hr/>\n",$index);
|
|
|
|
|
|
my $mkdirCmd = findBin("mkdir",$logger);
|
|
my $mkdirCmd = findBin("mkdir",$logger);
|
|
foreach my $project ( @$project_dirs_ref ) {
|
|
foreach my $project ( @$project_dirs_ref ) {
|
|
my $indexPath = $project . "index.html";
|
|
my $indexPath = $project . "index.html";
|
|
- append_file("<table><div id=\"cotent\"><table id=\"index\"><tbody>",$index);
|
|
|
|
- append_file("<tr><td><a href=\"projects/$indexPath\">$project</a></td>",$index);
|
|
|
|
|
|
+ append_file("<table><div id=\"cotent\"><table id=\"index\"><tbody>\n",$index);
|
|
|
|
+ append_file("<tr><td><a href=\"projects/$indexPath\">$project</a></td>\n",$index);
|
|
shellex("$mkdirCmd -p $web_projects_dir_path$project",$logger);
|
|
shellex("$mkdirCmd -p $web_projects_dir_path$project",$logger);
|
|
}
|
|
}
|
|
- append_file("</tr></tbody></table></div></body></html>",$index);
|
|
|
|
|
|
+ append_file("</tr></tbody></table></div></body></html>\n",$index);
|
|
$logger->info("Wrote root index at $index");
|
|
$logger->info("Wrote root index at $index");
|
|
|
|
|
|
}
|
|
}
|
|
@@ -94,17 +94,17 @@ sub gen_line_nums($$$) {
|
|
# Might be a better way to do this? TODO
|
|
# Might be a better way to do this? TODO
|
|
open my $fh, '>>', \$html_file or die "Can't open variable: $!";
|
|
open my $fh, '>>', \$html_file or die "Can't open variable: $!";
|
|
|
|
|
|
- print $fh "<!DOCTYPE html><html><b>$filename</b><hr/><div id=\"content\"><pre id=\"blob\">";
|
|
|
|
|
|
+ print $fh "<!DOCTYPE html><html><b>$filename</b><hr/><div id=\"content\"><pre id=\"blob\">\n";
|
|
my $line_counter = 1;
|
|
my $line_counter = 1;
|
|
foreach my $line ( split("\n", $raw_file) ) {
|
|
foreach my $line ( split("\n", $raw_file) ) {
|
|
if ( $line ne "" ) {
|
|
if ( $line ne "" ) {
|
|
$line = check_for_html($line);
|
|
$line = check_for_html($line);
|
|
}
|
|
}
|
|
- print $fh "<a href=\"\#l$line_counter\" class=\"line\" id=\"l$line_counter\">$line_counter</a>\t$line<br>";
|
|
|
|
|
|
+ print $fh "<a href=\"\#l$line_counter\" class=\"line\" id=\"l$line_counter\">$line_counter</a>\t$line<br>\n";
|
|
$line_counter++;
|
|
$line_counter++;
|
|
}
|
|
}
|
|
|
|
|
|
- print $fh "</pre></div><html>";
|
|
|
|
|
|
+ print $fh "</pre></div><html>\n";
|
|
close $fh;
|
|
close $fh;
|
|
|
|
|
|
$logger->info("Generated line numbers for $filename");
|
|
$logger->info("Generated line numbers for $filename");
|