1 |
|
---|
2 | extdesc="the Apache Jena Extension"
|
---|
3 |
|
---|
4 | full_setup=`pwd`/${BASH_SOURCE}
|
---|
5 | fulldir=${full_setup%/*}
|
---|
6 | fulldir=${fulldir%/.}
|
---|
7 |
|
---|
8 | if test -z $GSDLOS ; then
|
---|
9 | GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'`
|
---|
10 | # check for running bash under Cygwin
|
---|
11 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
12 | then
|
---|
13 | GSDLOS=windows
|
---|
14 | fi
|
---|
15 | # check for running bash under MinGW/MSys
|
---|
16 | if test "`echo $GSDLOS | sed 's/mingw//'`" != "$GSDLOS" ;
|
---|
17 | then
|
---|
18 | GSDLOS=windows
|
---|
19 | fi
|
---|
20 | echo "GSDLOS was not set. Setting it to '$GSDLOS'"
|
---|
21 | export GSDLOS
|
---|
22 | fi
|
---|
23 |
|
---|
24 |
|
---|
25 | if [ "x$GEXT_JENA" = "x" ] ; then
|
---|
26 | export GEXT_JENA=`pwd`
|
---|
27 | export GEXT_JENA_INSTALLED=$GEXT_JENA/$GSDLOS
|
---|
28 |
|
---|
29 | export FUSEKI_HOME=$GEXT_JENA
|
---|
30 | export FUSEKI3_PORT=4040
|
---|
31 |
|
---|
32 | if [ -d "$GEXT_JENA/bin/script" ] ; then
|
---|
33 | export PATH=$GEXT_JENA/bin/script:$PATH
|
---|
34 | fi
|
---|
35 |
|
---|
36 | if [ -d "$GEXT_JENA/bin/script3" ] ; then
|
---|
37 | export PATH=$GEXT_JENA/bin/script3:$PATH
|
---|
38 | fi
|
---|
39 |
|
---|
40 | if [ -d "$GEXT_JENA_INSTALLED/bin" ] ; then
|
---|
41 | export PATH=$GEXT_JENA_INSTALLED/bin:$PATH
|
---|
42 | fi
|
---|
43 |
|
---|
44 |
|
---|
45 | if [ -d "$GEXT_JENA/lib" ] ; then
|
---|
46 | if [ "$GSDLOS" = "linux" ] ; then
|
---|
47 | export LD_LIBRARY_PATH=$GEXT_JENA/lib:$LD_LIBRARY_PATH
|
---|
48 | elif [ "$GSDLOS" = "darwin" ] ; then
|
---|
49 | export DYLD_LIBRARY_PATH=$GEXT_JENA/lib:$DYLD_LIBRARY_PATH
|
---|
50 | fi
|
---|
51 | fi
|
---|
52 |
|
---|
53 | extdir=${GEXT_JENA##*/}
|
---|
54 |
|
---|
55 | if [ "x$GSDLEXTS" = "x" ] ; then
|
---|
56 | export GSDLEXTS=$extdir
|
---|
57 | else
|
---|
58 | export GSDLEXTS=$GSDLEXTS:$extdir
|
---|
59 | fi
|
---|
60 |
|
---|
61 |
|
---|
62 | echo "+Your environment is now setup for $extdesc"
|
---|
63 | else
|
---|
64 | echo "+Your environment is already setup for $extdesc"
|
---|
65 | fi
|
---|