#!/bin/bash # # A wrapper for calling Javadoc from Cygwin # Author: Igor Pechtchanski # ME="`basename $0`" JAVADOC_EXEC="/cygdrive/c/Program Files/IBM/Java13/bin/javadoc.exe" ARGS="" while [ -n "$1" ]; do arg="$1" shift case "$arg" in # Generic options -overview) arg="$arg' '`cygpath -w "$1"`" shift ;; -public | \ -protected | \ -package | \ -private | \ -help | \ -1.1 | \ -verbose) ;; -doclet | \ -locale | \ -encoding) arg="$arg' '$1" shift ;; -docletpath | \ -sourcepath | \ -classpath | \ -bootclasspath | \ -extdirs) arg="$arg' '`cygpath -p -w "$1"`" shift ;; # Java flags option -Jcp | -Jclasspath) arg="$arg' '`cygpath -p -w "$1"`" shift ;; -JXbootclasspath*:*) arg="${arg%%:*}:`cygpath -p -w "${arg#*:}"`" ;; -J*) ;; # Doclet options -d | \ -helpfile | \ -stylesheetfile) arg="$arg' '`cygpath -w "$1"`" shift ;; -use | \ -version | \ -author | \ -splitindex | \ -nodeprecated | \ -nodeprecatedlist | \ -nosince | \ -notree | \ -noindex | \ -nohelp | \ -nonavbar | \ -serialwarn) ;; -windowtitle | \ -doctitle | \ -title) arg="$arg' '$1" shift ;; -header | \ -footer | \ -bottom) # Quote single quotes arg="$arg' '`echo "$1" | sed "s/'/'"'"'"'"'"'"'/g"`" shift ;; -link) arg="$arg' '$1" shift ;; -link) arg="$arg' '$1' '$2" shift shift ;; -group) arg="$arg' '$1' '$2" shift shift ;; -charset | \ -docencoding) arg="$arg' '$1" shift ;; esac ARGS="$ARGS '$arg'" done eval "set -- $ARGS" exec "$JAVADOC_EXEC" "$@"