Last change
on this file since 37682 was 36757, checked in by davidb, 20 months ago |
Additional echo info added in
|
-
Property svn:executable
set to
*
|
File size:
1.4 KB
|
Rev | Line | |
---|
[36410] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
[36416] | 3 | function check_exists {
|
---|
| 4 | local prog_name=$1
|
---|
| 5 | local ext_name=$2
|
---|
[36410] | 6 |
|
---|
[36416] | 7 | local status=0
|
---|
[36410] | 8 |
|
---|
[36416] | 9 | echo ""
|
---|
| 10 | echo "Checking for '$prog_name'"
|
---|
[36410] | 11 |
|
---|
[36416] | 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
|
---|
[36420] | 18 | echo "* => Consider running ext-cli/get-${ext_name}.sh" 1>&2
|
---|
| 19 | echo "* and then source ./gs3-setup-cli.sh" 1>&2
|
---|
[36416] | 20 | echo "****" 1>&2
|
---|
| 21 | echo "" 1>&2
|
---|
| 22 | # echo "Exiting check sequence ..." 1>&2
|
---|
| 23 | # echo "" 1>&2
|
---|
| 24 | status=1
|
---|
| 25 | fi
|
---|
[36410] | 26 |
|
---|
[36416] | 27 | return $status
|
---|
| 28 | }
|
---|
[36410] | 29 |
|
---|
[36420] | 30 | check_exists java "selfcontained-jdk"
|
---|
| 31 | found_java=1
|
---|
[36416] | 32 |
|
---|
| 33 | check_exists ant "selfcontained-ant"
|
---|
[36420] | 34 | found_ant=1
|
---|
[36416] | 35 |
|
---|
| 36 | check_exists javac "selfcontained-jdk"
|
---|
[36420] | 37 | found_javac=1
|
---|
[36416] | 38 |
|
---|
[36420] | 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
|
---|
[36757] | 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 "----"
|
---|
[36420] | 58 | fi
|
---|
[36416] | 59 |
|
---|
[36757] | 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.