Last change
on this file since 24250 was 20188, checked in by kjdon, 14 years ago |
removed the test around sourcing gs3-setup.sh so that it always gets run
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | serverlang=en
|
---|
3 |
|
---|
4 | java_min_version=1.4.0_00
|
---|
5 |
|
---|
6 | autoset_gsdl_home() {
|
---|
7 |
|
---|
8 | # remove leading ./ if present
|
---|
9 | prog="${0#./}"
|
---|
10 |
|
---|
11 | isrelative="${prog%%/*}"
|
---|
12 |
|
---|
13 | if [ ! -z $isrelative ] ; then
|
---|
14 | # some text is left after stripping
|
---|
15 | # => is relative
|
---|
16 | pwd="$PWD"
|
---|
17 | prog="$pwd/$prog"
|
---|
18 | fi
|
---|
19 |
|
---|
20 | fulldir="${prog%/*}"
|
---|
21 |
|
---|
22 | # remove trailing /. if present
|
---|
23 | eval $1=\""${fulldir%/.}"\"
|
---|
24 | }
|
---|
25 |
|
---|
26 |
|
---|
27 | echo "Greenstone 3 Server"
|
---|
28 | echo "Copyright (C) 2009, New Zealand Digital Library Project, University Of Waikato"
|
---|
29 | echo "This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
|
---|
30 | echo "This is free software, and you are welcome to redistribute it"
|
---|
31 |
|
---|
32 | ## -------- Run the Greenstone 3 Server --------
|
---|
33 |
|
---|
34 |
|
---|
35 | ## ---- Determine GSDL3SRCHOME ----
|
---|
36 | gsdl3path=
|
---|
37 |
|
---|
38 | # Some users may set the above line manually
|
---|
39 | if [ -z "$gsdl3path" ]; then
|
---|
40 | autoset_gsdl_home "gsdl3path"
|
---|
41 | fi
|
---|
42 |
|
---|
43 | # Setup Greenstone3
|
---|
44 | pushd $gsdl3path > /dev/null
|
---|
45 | source ./gs3-setup.sh
|
---|
46 | popd > /dev/null
|
---|
47 |
|
---|
48 | # JRE_HOME or JAVA_HOME must be set correctly to run this program
|
---|
49 | HINT="`pwd`/packages/jre"
|
---|
50 | javapath=`search4j -p "$HINT" -m $java_min_version -e`
|
---|
51 | if [ "$?" == "0" ]; then
|
---|
52 | # In Java code, '...getResourceAsStream("build.properties")'
|
---|
53 | # needs up to be in the right directory when run
|
---|
54 | pushd "$gsdl3path" > /dev/null
|
---|
55 |
|
---|
56 | "$javapath" org.greenstone.server.Server3 "$GSDL3SRCHOME" $serverlang
|
---|
57 |
|
---|
58 | popd > /dev/null
|
---|
59 | fi
|
---|
60 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.