#!/bin/sh cd "${0%/*}" || exit # Run from this directory [ -d "$WM_PROJECT_DIR" ] || { echo "Error (${0##*/}) : no \$WM_PROJECT_DIR found" echo " Check your OpenFOAM environment and installation" echo " WM_PROJECT_DIR=$WM_PROJECT_DIR" exit 1 } usage() { exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 exit 1 } shift ;; -dir) shift if [ -d "$1" ] then dirNames="$dirNames $1" else echo "Could not resolve input directory: $1" 1>&2 exit 1 fi ;; -online) defineURL ;; -*) usage "unknown option: '$1'" ;; *) # dirName if [ -d "$1" ] then dirNames="$dirNames $1" else echo "Could not resolve input directory: $1" 1>&2 fi ;; *) usage "unknown option/argument: '$1'" ;; esac shift done #------------------------------------------------------------------------------ rm -rf latex man # Remove html directory in background mv html html-stagedRemove$$ 2>/dev/null rm -rf html-stagedRemove$$ 2>/dev/null & # Ensure that created files are readable by everyone umask 22 if [ -n "$dirNames" ] then ( cat ${configName:-Doxyfile} echo "INPUT = $dirNames" ) | doxygen - else doxygen $configName fi # Fix permissions (NB: '+X' and not '+x'!) chmod -R a+rX html latex man 2>/dev/null echo echo "Done doxygen" echo #------------------------------------------------------------------------------