#!/bin/bash ## Shell script for running PDFDoclet from the command line ## ## see javadoc(1), also http://pdfdoclet.sourceforge.net/running.html ## ## Args: ## 1: PDF filename (optional, default javadoc.pdf) ## 2: source directory (optionall, default $PWD) ## 3: list of pacakges to generate documentation for (optional, ## default is derived based on pathname semantics in the source ## directory) THISDIR=$(dirname $(realpath $0)) PDF="${1:-javadoc.pdf}" shift #echo PDF=$PDF SRC="${1:-$PWD}" shift #echo SRC=$SRC if [ -n "$1" ]; then PACKAGES="$1" shift else PACKAGES="$(find "$SRC" -type d ! -path "*META-INF*" -a ! -path "*WEB-INF*" -printf "\n%P" | sed 's|/|.|g')" fi #echo PACKAGES=$PACKAGES CFG="${1:-$THISDIR/../share/pdfdoclet/default.properties}" shift #echo CFG=$CFG JAVADOC=/usr/bin/javadoc JAR=${THISDIR}/../share/java/pdfdoclet.jar DOCLET=com.tarsec.javadoc.pdfdoclet.PDFDoclet export CLASSPATH=$JAR exec "${JAVADOC}" -docletpath "${JAR}" -doclet "${DOCLET}" \ -pdf "${PDF}" -config "${CFG}" -sourcepath "${SRC}" $PACKAGES