[27783] | 1 |
|
---|
| 2 | extdesc="the Solr Extension"
|
---|
| 3 |
|
---|
| 4 | full_setup=`pwd`/${BASH_SOURCE}
|
---|
| 5 | fulldir=${full_setup%/*}
|
---|
| 6 | fulldir=${fulldir%/.}
|
---|
| 7 |
|
---|
| 8 | #--
|
---|
| 9 | # Edit the following two port values if they conflict with
|
---|
| 10 | # with existing services on your computer
|
---|
| 11 | #--
|
---|
| 12 |
|
---|
| 13 | # The port Jetty runs on [Default 8983]:
|
---|
| 14 | SOLR_JETTY_PORT=**PORT**
|
---|
| 15 |
|
---|
| 16 | # The port Jetty listens on for a "stop" command [Default 8079]
|
---|
| 17 | JETTY_STOP_PORT=**PORT**
|
---|
| 18 |
|
---|
| 19 | if test -z $GSDLOS ; then
|
---|
| 20 | GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'`
|
---|
| 21 | # check for running bash under Cygwin
|
---|
| 22 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
| 23 | then
|
---|
| 24 | GSDLOS=windows
|
---|
| 25 | fi
|
---|
| 26 | # check for running bash under MinGW/MSys
|
---|
| 27 | if test "`echo $GSDLOS | sed 's/mingw//'`" != "$GSDLOS" ;
|
---|
| 28 | then
|
---|
| 29 | GSDLOS=windows
|
---|
| 30 | fi
|
---|
| 31 | echo "GSDLOS was not set. Setting it to '$GSDLOS'"
|
---|
| 32 | export GSDLOS
|
---|
| 33 | fi
|
---|
| 34 |
|
---|
| 35 | first_time=0;
|
---|
| 36 |
|
---|
| 37 | if [ "x$GEXT_SOLR" = "x" ] ; then
|
---|
| 38 | export GEXT_SOLR=`pwd`
|
---|
| 39 |
|
---|
| 40 | if [ -d "$GEXT_SOLR/bin/script" ] ; then
|
---|
| 41 | export PATH=$GEXT_SOLR/bin/script:$PATH
|
---|
| 42 | fi
|
---|
| 43 |
|
---|
| 44 | if [ -d "$GEXT_SOLR/lib" ] ; then
|
---|
| 45 | if [ "$GSDLOS" = "linux" ] ; then
|
---|
| 46 | if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
|
---|
| 47 | export LD_LIBRARY_PATH=$GEXT_SOLR/lib
|
---|
| 48 | else
|
---|
| 49 | export LD_LIBRARY_PATH=$GEXT_SOLR/lib:$LD_LIBRARY_PATH
|
---|
| 50 | fi
|
---|
| 51 | elif [ "$GSDLOS" = "darwin" ] ; then
|
---|
| 52 | if [ "x$DYLD_LIBRARY_PATH" = "x" ] ; then
|
---|
| 53 | export DYLD_LIBRARY_PATH=$GEXT_SOLR/lib
|
---|
| 54 | else
|
---|
| 55 | export DYLD_LIBRARY_PATH=$GEXT_SOLR/lib:$DYLD_LIBRARY_PATH
|
---|
| 56 | fi
|
---|
| 57 | fi
|
---|
| 58 | fi
|
---|
| 59 |
|
---|
| 60 | extdir=${GEXT_SOLR##*/}
|
---|
| 61 |
|
---|
| 62 | if [ "x$GSDLEXTS" = "x" ] ; then
|
---|
| 63 | export GSDLEXTS=$extdir
|
---|
| 64 | else
|
---|
| 65 | export GSDLEXTS=$GSDLEXTS:$extdir
|
---|
| 66 | fi
|
---|
| 67 |
|
---|
| 68 | export SOLR_JETTY_PORT
|
---|
| 69 | export JETTY_STOP_PORT
|
---|
| 70 | first_time=1
|
---|
| 71 |
|
---|
| 72 | echo "+Your environment is now setup for $extdesc"
|
---|
| 73 | else
|
---|
| 74 | echo "+Your environment is already setup for $extdesc"
|
---|
| 75 | fi
|
---|
| 76 |
|
---|
| 77 | echo "++Solr/Jetty server will run on port $SOLR_JETTY_PORT (+ port $JETTY_STOP_PORT for shutdown command)"
|
---|
| 78 |
|
---|
| 79 | if [ "$first_time" = "1" ] ; then
|
---|
| 80 | echo "--These port values can be changed by editing:"
|
---|
| 81 | echo "-- $full_setup"
|
---|
| 82 | fi
|
---|