adding all of botlist, initial add
[botlist.git] / botlistprojects / botlistdocs / bin / bothelp.sh
blob9988d24eb62cb3c117500241e93c7fd64c2c3293
1 #!/bin/sh
3 #---------------------------------------
4 # Copyright 2006-2007 Newspiritcompany.com. All Rights Reserved.
6 # 10/30/2007
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
12 case $0 in
13 /*)
14 ABS_APP_PATH=$0
15 ABS_CONF=`dirname $ABS_APP_PATH`
16 ABS_CONF=`dirname $ABS_CONF`
19 bin*)
20 ABS_APP_PATH=`pwd`
21 ABS_CONF=$ABS_APP_PATH
24 ABS_APP_PATH=`pwd`
25 ABS_CONF=`dirname $ABS_APP_PATH`
26 ;;
27 esac
30 TOP_DIR=$ABS_CONF
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 "-----------------------"
61 echo $DOCS_CLASSPATH
62 echo
64 java -classpath "$DOCS_CLASSPATH" $APP_MAIN ${DIR_PROPERTIES}/runtime/index_home/index
66 ### End of Script