From da402d66df24e3d0120dc933dcba5a6aa16454ed Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 07 Oct 2008 09:52:39 -0400
Subject: [PATCH] #1485456: small improvements in scripts

---
 bin/makedoc.sh |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/bin/makedoc.sh b/bin/makedoc.sh
index 5925d0a..02bc7a2 100755
--- a/bin/makedoc.sh
+++ b/bin/makedoc.sh
@@ -3,9 +3,20 @@
 TITLE="RoundCube Classes"
 PACKAGES="Core"
 
-PATH_PROJECT=$PWD/program/include
-PATH_DOCS=$PWD/doc/phpdoc
-PATH_PHPDOC=/usr/local/php5/bin/phpdoc
+INSTALL_PATH="`dirname $0`/.."
+PATH_PROJECT=$INSTALL_PATH/program/include
+PATH_DOCS=$INSTALL_PATH/doc/phpdoc
+
+if [ -x /usr/local/php5/bin/phpdoc ]
+then
+  PATH_PHPDOC=/usr/local/php5/bin/phpdoc
+elif [ -x /usr/bin/phpdoc ]
+then
+  PATH_PHPDOC=/usr/bin/phpdoc
+else
+  echo "phpdoc not found"
+  exit 1
+fi
 
 OUTPUTFORMAT=HTML
 CONVERTER=frames

--
Gitblit v1.9.1