3 #---------------------------------------
4 # Copyright 2006-2007 Newspiritcompany.com. All Rights Reserved.
7 #---------------------------------------
9 # Depending on if we are running from pwd or not, determine
10 # proper location to change directory to.
11 # Through the use of 'dirname' and 'pwd', $0
15 ABS_CONF
=`dirname $ABS_APP_PATH`
16 ABS_CONF
=`dirname $ABS_CONF`
21 ABS_CONF
=$ABS_APP_PATH
25 ABS_CONF
=`dirname $ABS_APP_PATH`
31 DIR_PROPERTIES
=$ABS_CONF
33 APP_MAIN
=SearchHelpDocs
35 ## Set the classpath settings
36 LIB1
=${TOP_DIR}/lib
/sbaz.jar
37 LIB2
=${TOP_DIR}/lib
/scala-compiler.jar
38 LIB3
=${TOP_DIR}/lib
/scala-library.jar
39 LIB4
=${TOP_DIR}/lib
/lucene-core-2.2
.0.jar
40 LIBAPP
=${TOP_DIR}/build
/classes
42 DOCS_CLASSPATH
=.
:$LIB1:$LIB2:$LIB3:$LIB4:$LIBAPP
44 ## Overwrite, existing values if working with cygwin.
45 if [ $
(uname
-s |
grep -c CYGWIN
) -gt 0 ] ; then
46 # Convert unix style paths to windows
47 echo "WARN: running in CYGWIN environment"
48 LIB1
=`cygpath -wp ${LIB1}`
49 LIB2
=`cygpath -wp ${LIB2}`
50 LIB3
=`cygpath -wp ${LIB3}`
51 LIB4
=`cygpath -wp ${LIB4}`
52 LIBAPP
=`cygpath -wp ${LIBAPP}`
53 DOCS_CLASSPATH
=".;$LIB1;$LIB2;$LIB3;$LIB4;$LIBAPP"
54 DIR_PROPERTIES
=`cygpath -wp ${DIR_PROPERTIES}`
58 ## Use the first arg, for example 'sweep' 'findcategory'
59 echo "SCRIPT: running in directory=${TOP_DIR}"
60 echo "-----------------------"
64 java
-classpath "$DOCS_CLASSPATH" $APP_MAIN ${DIR_PROPERTIES}/runtime
/index_home
/index