Last change
on this file since 37732 was 36757, checked in by davidb, 20 months ago |
Additional echo info added in
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | function check_exists {
|
---|
4 | local prog_name=$1
|
---|
5 | local ext_name=$2
|
---|
6 |
|
---|
7 | local status=0
|
---|
8 |
|
---|
9 | echo ""
|
---|
10 | echo "Checking for '$prog_name'"
|
---|
11 |
|
---|
12 | if type -p $prog_name > /dev/null ; then
|
---|
13 | echo " => Found $prog_name executable in PATH"
|
---|
14 | else
|
---|
15 | echo "****" 1>&2
|
---|
16 | echo "* Failed to find '$prog_name'" 1>&2
|
---|
17 | echo "*" 1>&2
|
---|
18 | echo "* => Consider running ext-cli/get-${ext_name}.sh" 1>&2
|
---|
19 | echo "* and then source ./gs3-setup-cli.sh" 1>&2
|
---|
20 | echo "****" 1>&2
|
---|
21 | echo "" 1>&2
|
---|
22 | # echo "Exiting check sequence ..." 1>&2
|
---|
23 | # echo "" 1>&2
|
---|
24 | status=1
|
---|
25 | fi
|
---|
26 |
|
---|
27 | return $status
|
---|
28 | }
|
---|
29 |
|
---|
30 | check_exists java "selfcontained-jdk"
|
---|
31 | found_java=1
|
---|
32 |
|
---|
33 | check_exists ant "selfcontained-ant"
|
---|
34 | found_ant=1
|
---|
35 |
|
---|
36 | check_exists javac "selfcontained-jdk"
|
---|
37 | found_javac=1
|
---|
38 |
|
---|
39 | if [ $? != 0 ] ; then
|
---|
40 | if [ $found_java = 1 ] ; then
|
---|
41 | echo "Having found 'java' but not 'javac' means you can run Greenstone3, but not compile it"
|
---|
42 | fi
|
---|
43 | else
|
---|
44 | # found javac
|
---|
45 | if [ "x$JAVA_HOME" ] ; then
|
---|
46 | echo ""
|
---|
47 | echo "Warning: JAVA_HOME not set, which means you will be unable to compile in JNI support"
|
---|
48 | fi
|
---|
49 |
|
---|
50 | echo ""
|
---|
51 | echo "----"
|
---|
52 | echo "A typical compile sequence is:"
|
---|
53 | echo " ant"
|
---|
54 | echo " # review and edit (if required) build.properies"
|
---|
55 | echo " ant prepare"
|
---|
56 | echo " ant install"
|
---|
57 | echo "----"
|
---|
58 | fi
|
---|
59 |
|
---|
60 | echo ""
|
---|
61 |
|
---|
62 | echo "----"
|
---|
63 | echo "To start a Greenstone3 installation, enter:"
|
---|
64 | echo " ant start"
|
---|
65 | echo "----"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.