forked from javaee/javahelp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjhindexer
More file actions
49 lines (39 loc) · 1.1 KB
/
jhindexer
File metadata and controls
49 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/sh
# This builds a search database
# Cygwin support. $cygwin _must_ be set to either true or false.
case "`uname`" in
CYGWIN*) cygwin=true ;;
*) cygwin=false ;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
[ -n "$JAVAHELP_HOME" ] &&
JAVAHELP_HOME=`cygpath --unix "$JAVAHELP_HOME"`
fi
if [ "$JAVAHELP_HOME" = "" ] ; then
# try to find jhindexer
if [ -d /opt/javahelp ] ; then
JAVAHELP_HOME=/opt/javahelp
fi
if [ -d ${HOME}/opt/jhindexer ] ; then
JAVAHELP_HOME=${HOME}/opt/javahelp
fi
## resolve links - $0 may be a link to javahelp's home
PRG=$0
progname=`basename $0`
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname $PRG`/$link"
fi
done
JAVAHELP_HOME=`dirname "$PRG"`/../..
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
JAVAHELP_HOME=`cygpath --path --windows "$JAVAHELP_HOME"`
fi
java -jar $JAVAHELP_HOME/javahelp/bin/jhindexer.jar "$@"