summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-01-09 21:37:41 +0000
committertill <till@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-01-09 21:37:41 +0000
commitb196f32747162776b503367cdab298b85aee4639 (patch)
tree965f1d91b545d772388d412bc250dc1f2158f00c
parent74b5268a9250454f651f8681b2182471e3f3e250 (diff)
* generalized executable paths for bash and phpdoc
* simplyfied probing for phpdoc * added checks to make sure this is executed on the shell git-svn-id: https://svn.roundcube.net/trunk@2230 208e9e7b-5314-0410-a742-e7e81cd9613c
-rwxr-xr-xroundcubemail/bin/makedoc.sh23
1 files changed, 14 insertions, 9 deletions
diff --git a/roundcubemail/bin/makedoc.sh b/roundcubemail/bin/makedoc.sh
index 02bc7a216..26757c0a7 100755
--- a/roundcubemail/bin/makedoc.sh
+++ b/roundcubemail/bin/makedoc.sh
@@ -1,4 +1,13 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+if [ -z "$SSH_TTY" ]
+then
+ if [ -z "$DEV_TTY" ]
+ then
+ echo "Not on the shell."
+ exit 1
+ fi
+fi
TITLE="RoundCube Classes"
PACKAGES="Core"
@@ -6,15 +15,11 @@ PACKAGES="Core"
INSTALL_PATH="`dirname $0`/.."
PATH_PROJECT=$INSTALL_PATH/program/include
PATH_DOCS=$INSTALL_PATH/doc/phpdoc
+BIN_PHPDOC="`/usr/bin/which phpdoc`"
-if [ -x /usr/local/php5/bin/phpdoc ]
-then
- PATH_PHPDOC=/usr/local/php5/bin/phpdoc
-elif [ -x /usr/bin/phpdoc ]
+if [ ! -x "$BIN_PHPDOC" ]
then
- PATH_PHPDOC=/usr/bin/phpdoc
-else
- echo "phpdoc not found"
+ echo "phpdoc not found: $BIN_PHPDOC"
exit 1
fi
@@ -24,6 +29,6 @@ TEMPLATE=earthli
PRIVATE=off
# make documentation
-$PATH_PHPDOC -d $PATH_PROJECT -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \
+$BIN_PHPDOC -d $PATH_PROJECT -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE