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

Last change on this file was 27783, checked in by jmt12, 11 years ago

template file for GS2 extensions

File size: 1.9 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 [Default 8983]:
14SOLR_JETTY_PORT=**PORT**
15
16# The port Jetty listens on for a "stop" command [Default 8079]
17JETTY_STOP_PORT=**PORT**
18
19if 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
33fi
34
35first_time=0;
36
37if [ "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"
73else
74 echo "+Your environment is already setup for $extdesc"
75fi
76
77echo "++Solr/Jetty server will run on port $SOLR_JETTY_PORT (+ port $JETTY_STOP_PORT for shutdown command)"
78
79if [ "$first_time" = "1" ] ; then
80 echo "--These port values can be changed by editing:"
81 echo "-- $full_setup"
82fi
Note: See TracBrowser for help on using the repository browser.