Changeset 2230 in subversion


Ignore:
Timestamp:
Jan 9, 2009 4:37:41 PM (4 years ago)
Author:
till
Message:
  • generalized executable paths for bash and phpdoc
  • simplyfied probing for phpdoc
  • added checks to make sure this is executed on the shell
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/bin/makedoc.sh

    r1952 r2230  
    1 #!/bin/bash 
     1#!/usr/bin/env bash 
     2 
     3if [ -z "$SSH_TTY" ] 
     4then 
     5  if [ -z "$DEV_TTY" ] 
     6  then 
     7    echo "Not on the shell." 
     8    exit 1 
     9  fi 
     10fi 
    211 
    312TITLE="RoundCube Classes" 
     
    716PATH_PROJECT=$INSTALL_PATH/program/include 
    817PATH_DOCS=$INSTALL_PATH/doc/phpdoc 
     18BIN_PHPDOC="`/usr/bin/which phpdoc`" 
    919 
    10 if [ -x /usr/local/php5/bin/phpdoc ] 
     20if [ ! -x "$BIN_PHPDOC" ] 
    1121then 
    12   PATH_PHPDOC=/usr/local/php5/bin/phpdoc 
    13 elif [ -x /usr/bin/phpdoc ] 
    14 then 
    15   PATH_PHPDOC=/usr/bin/phpdoc 
    16 else 
    17   echo "phpdoc not found" 
     22  echo "phpdoc not found: $BIN_PHPDOC" 
    1823  exit 1 
    1924fi 
     
    2530 
    2631# make documentation 
    27 $PATH_PHPDOC -d $PATH_PROJECT -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \ 
     32$BIN_PHPDOC -d $PATH_PROJECT -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \ 
    2833-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE 
    2934 
Note: See TracChangeset for help on using the changeset viewer.