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:
|
---|
14 | SOLR_JETTY_PORT=8983
|
---|
15 |
|
---|
16 | # The port Jetty listens on for a "stop" command
|
---|
17 | JETTY_STOP_PORT=8079
|
---|
18 |
|
---|
19 |
|
---|
20 | if test -z $GSDLOS ; then
|
---|
21 | GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'`
|
---|
22 | # check for running bash under Cygwin
|
---|
23 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
24 | then
|
---|
25 | GSDLOS=windows
|
---|
26 | fi
|
---|
27 | # check for running bash under MinGW/MSys
|
---|
28 | if test "`echo $GSDLOS | sed 's/mingw//'`" != "$GSDLOS" ;
|
---|
29 | then
|
---|
30 | GSDLOS=windows
|
---|
31 | fi
|
---|
32 | echo "GSDLOS was not set. Setting it to '$GSDLOS'"
|
---|
33 | export GSDLOS
|
---|
34 | fi
|
---|
35 |
|
---|
36 | first_time=0;
|
---|
37 |
|
---|
38 | if [ "x$GEXT_SOLR" = "x" ] ; then
|
---|
39 | export GEXT_SOLR=`pwd`
|
---|
40 |
|
---|
41 | if [ -d "$GEXT_SOLR/bin/script" ] ; then
|
---|
42 | export PATH=$GEXT_SOLR/bin/script:$PATH
|
---|
43 | fi
|
---|
44 |
|
---|
45 | if [ -d "$GEXT_SOLR/lib" ] ; then
|
---|
46 | if [ "$GSDLOS" = "linux" ] ; then
|
---|
47 | export LD_LIBRARY_PATH=$GEXT_SOLR/lib:$LD_LIBRARY_PATH
|
---|
48 | elif [ "$GSDLOS" = "darwin" ] ; then
|
---|
49 | export DYLD_LIBRARY_PATH=$GEXT_SOLR/lib:$DYLD_LIBRARY_PATH
|
---|
50 | fi
|
---|
51 | fi
|
---|
52 |
|
---|
53 | extdir=${GEXT_SOLR##*/}
|
---|
54 |
|
---|
55 | if [ "x$GSDL3EXTS" = "x" ] ; then
|
---|
56 | export GSDL3EXTS=$extdir
|
---|
57 | else
|
---|
58 | export GSDL3EXTS=$GSDL3EXTS:$extdir
|
---|
59 | fi
|
---|
60 |
|
---|
61 | export SOLR_JETTY_PORT
|
---|
62 | export JETTY_STOP_PORT
|
---|
63 | first_time=1
|
---|
64 |
|
---|
65 | echo "+Your environment is now setup for $extdesc"
|
---|
66 | else
|
---|
67 | echo "+Your environment is already setup for $extdesc"
|
---|
68 | fi
|
---|
69 |
|
---|
70 | echo "++Solr/Jetty server will run on port $SOLR_JETTY_PORT (+ port $JETTY_STOP_PORT for shutdown command)"
|
---|
71 |
|
---|
72 | if [ "$first_time" = "1" ] ; then
|
---|
73 | echo "--These port values can be changed by editing:"
|
---|
74 | echo "-- $full_setup"
|
---|
75 | fi
|
---|