Skip to content
Snippets Groups Projects
Commit ec78d34f authored by mh17's avatar mh17
Browse files

minor tweak - leading /

parent 2639d763
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/perl
# <!-- $Id: docgen,v 1.3 2010-03-09 09:49:03 mh17 Exp $ -->
# <!-- $Id: docgen,v 1.4 2010-03-10 12:21:38 mh17 Exp $ -->
# generate a *.shtml file to STDOUT from headerless *.html
# css is in ZMap/doc/css/dev_server.css
# menu data is in ZMap/doc/<design>/scripts/ plus also the current dir (file.rel)
......@@ -76,13 +76,13 @@ sub get_dirs
# find /doc/ and count the number of '/' following
@dirs = split(/\//,$dir);
$base = '/';
$base = "";
$doc = $d = "";
while (@dirs && ($d ne "doc")) # ie our document root with the CSS
{
$d = shift @dirs;
$base .= $d . '/';
$base .= $d . '/'; # NB first one is '' before the first /
}
if(@dirs)
{
......@@ -104,7 +104,7 @@ sub gen_file
{
print OFILE "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
print OFILE "<html>\n<head>\n\t<title>ZMap Design Documentation</title>\n";
print OFILE "<base href=\"file://$base\" />\n";
print OFILE "\t<base href=\"file://$base\" />\n";
print OFILE "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"$css\" />\n";
print OFILE "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"$zmap_css\" />\n";
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment