source: gs3-extensions/solr/trunk/src/setup.bash@ 24446

Last change on this file since 24446 was 24446, checked in by davidb, 13 years ago

Start of Solr extension for Greenstone3

File size: 1.7 KB
Line 
1
2extdesc="the Solr Extension"
3
4full_setup=`pwd`/${BASH_SOURCE}
5fulldir=${full_setup%/*}
6fulldir=${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:
14SOLR_JETTY_PORT=8983
15
16# The port Jetty listens on for a "stop" command
17JETTY_STOP_PORT=8079
18
19
20if 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
34fi
35
36first_time=0;
37
38if [ "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$GSDLEXTS" = "x" ] ; then
56 export GSDLEXTS=$extdir
57 else
58 export GSDLEXTS=$GSDLEXTS:$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"
66else
67 echo "+Your environment is already setup for $extdesc"
68fi
69
70echo "++Solr/Jetty server will run on port $SOLR_JETTY_PORT (+ port $JETTY_STOP_PORT for shutdown command)"
71
72if [ "$first_time" = "1" ] ; then
73 echo "--These port values can be changed by editing:"
74 echo "-- $full_setup"
75fi
Note: See TracBrowser for help on using the repository browser.