From 4f1c73f8b1a37f0aa88211a2a408803ab5d33b37 Mon Sep 17 00:00:00 2001
From: Brian Carrier <carrier@sleuthkit.org>
Date: Fri, 17 Oct 2008 19:30:25 +0000
Subject: [PATCH] Updated to reflect svn paths

---
 man/build-html     | 40 ++++++++++++++++++++++++++++++++++------
 tsk3/docs/Doxyfile |  2 +-
 2 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/man/build-html b/man/build-html
index 2a2e332cd..b705077ce 100755
--- a/man/build-html
+++ b/man/build-html
@@ -1,8 +1,36 @@
-#!/bin/sh
+#!/usr/bin/perl -w
 
-RMAN=../../rman-3.2/rman
+use strict;
 
-files='blkcalc blkcat disk_sreset disk_stat blkls blkstat ffind fls fsstat hfind icat ifind ils img_cat img_stat istat jcat jls mactime mmcat mmls mmstat sigfind sorter'
-for f in $files
-  do $RMAN -f html ${f}.1 > ../../www/man/${f}.html
-done
+my $BACK = "";
+my $RMAN = "/rman-3.2/rman";
+
+# rman and www are back different levels depending on 
+# which branch we are on.
+if (-d "../../../rman-3.2") {
+    $BACK = "../../../";
+} elsif (-d "../../../../rman-3.2") {
+    $BACK = "../../../../";
+} else {
+    die "Missing rman directory";
+}
+
+die "www not in same dir as rman" unless (-e "${BACK}/www");
+
+print "Cleaning up www directory\n";
+system ("rm ${BACK}/www/man/*.html");
+
+print "Building html files\n";
+opendir (DIR, ".") or die "Error opening current directory";
+while (1) {
+    my $f = readdir(DIR);
+    last unless defined ($f);
+    next if (($f eq ".") || ($f eq ".."));
+    if ($f =~ /^(.*?)\.1$/) {
+        $f = $1;
+    } else {
+        next;
+    }
+
+    system("${BACK}${RMAN} -f html ${f}.1 > ${BACK}/www/man/${f}.html");
+}
diff --git a/tsk3/docs/Doxyfile b/tsk3/docs/Doxyfile
index aabd91a0a..40d60761e 100644
--- a/tsk3/docs/Doxyfile
+++ b/tsk3/docs/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NUMBER         = 3.0
 # If a relative path is entered, it will be relative to the location 
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = ../www/docs
+OUTPUT_DIRECTORY       = ../../../www/docs
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
 # 4096 sub-directories (in 2 levels) under the output directory of each output 
-- 
GitLab