2 # This builds a search database
4 # Cygwin support. $cygwin _must_ be set to either true or false.
6 CYGWIN*) cygwin=true ;;
10 # For Cygwin, ensure paths are in UNIX format before anything is touched
12 [ -n "$JAVAHELP_HOME" ] &&
13 JAVAHELP_HOME=`cygpath --unix "$JAVAHELP_HOME"`
16 if [ "$JAVAHELP_HOME" = "" ] ; then
17 # try to find jhindexer
18 if [ -d /opt/javahelp ] ; then
19 JAVAHELP_HOME=/opt/javahelp
22 if [ -d ${HOME}/opt/jhindexer ] ; then
23 JAVAHELP_HOME=${HOME}/opt/javahelp
26 ## resolve links - $0 may be a link to javahelp's home
28 progname=`basename $0`
30 while [ -h "$PRG" ] ; do
32 link=`expr "$ls" : '.*-> \(.*\)$'`
33 if expr "$link" : '.*/.*' > /dev/null; then
36 PRG="`dirname $PRG`/$link"
40 JAVAHELP_HOME=`dirname "$PRG"`/../..
44 # For Cygwin, switch paths to Windows format before running java
46 JAVAHELP_HOME=`cygpath --path --windows "$JAVAHELP_HOME"`
49 java -jar $JAVAHELP_HOME/javahelp/bin/jhindexer.jar "$@"