--- mitgcm.org/devel/buildweb/bin/bonniefy.pl 2002/09/20 19:47:31 1.1.1.1 +++ mitgcm.org/devel/buildweb/bin/bonniefy.pl 2006/04/09 13:30:36 1.4 @@ -7,17 +7,24 @@ #DIRECTORIES (ABSOLUTE PATHS) $targetdir = "/u/httpd/html/devel/sealion/"; # Web site location $homedir = "/u/httpd/html/devel/buildweb/"; # This code dir -$latexroot = $homedir."latex/"; # LaTeX pages -$vdbroot = $homedir."vdb/"; # VDB pages -$templatedir = $homedir."templates/"; # Conversion templates -$pfilesdir = $homedir."program_files/"; # Program/config files +$latexroot = $homedir."latex/"; # LaTeX pages +$vdbroot = $homedir."vdb/"; # VDB pages +$templatedir = $homedir."templates/"; # Conversion templates +$pfilesdir = $homedir."program_files/"; # Program/config files # PROCESS COMMAND LINE ARGUMENTS foreach $_ (@ARGV) { if (/--targetdir=(.*)/) {$targetdir=endslash($1); print "Setting targetdir = $targetdir\n";}; - if (/--homedir=(.*)/) {$homedir=endslash($1); - print "Setting homedir = $homedir\n";}; + if (/--homedir=(.*)/) { + $homedir=endslash($1); + #eh3 subdirectories of homedir + $latexroot = $homedir."latex/"; # LaTeX pages + $vdbroot = $homedir."vdb/"; # VDB pages + $templatedir = $homedir."templates/"; # Conversion templates + $pfilesdir = $homedir."program_files/"; # Program/config files + print "Setting homedir = $homedir\n"; + }; if (/--latexroot=(.*)/) {$latexroot=endslash($1); print "Setting latexroot = $latexroot\n";}; if (/--vdbroot=(.*)/) {$vdbroot=endslash($1); @@ -28,6 +35,7 @@ print "Setting pfilesdir = $pfilesdir\n";}; } + #DIRECTORIS WITHIN WEB SITE $webbase = "../"; $latek2htmldir = "online_documents/"; @@ -102,7 +110,7 @@ $notfound = 1; $j=0; - while (($j < $#htmlfiles) && ($notfound)) { + while (($j <= $#htmlfiles) && ($notfound)) { open(THISHTML,$htmlfiles[$j]) || die("can't open $htmlfiles[$j]"); while () { @@ -152,7 +160,7 @@ ### added by AJA: create a flag to indicate whether file has been associated # with a template (1 = no and 0 = yes) $thisfile=0; - while ($thisfile < $#htmlfiles) { + while ($thisfile <= $#htmlfiles) { $htmlfileassociated[$thisfile]=1; $thisfile++; } # loop through file @@ -187,7 +195,7 @@ $pattern = $template2patternlist[$thispattern+1]; $thisfile=0; - while ($thisfile < $#htmlfiles) { + while ($thisfile <= $#htmlfiles) { open(THISHTML,$htmlfiles[$thisfile]) || die("can't open $htmlfiles[$thisfile]"); while () { if (/$pattern/ && $htmlfileassociated[$thisfile]){