source: main/trunk/greenstone3/gs3-check-cli.sh@ 36943

Last change on this file since 36943 was 36757, checked in by davidb, 19 months ago

Additional echo info added in

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2
3function 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
30check_exists java "selfcontained-jdk"
31found_java=1
32
33check_exists ant "selfcontained-ant"
34found_ant=1
35
36check_exists javac "selfcontained-jdk"
37found_javac=1
38
39if [ $? != 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
43else
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 "----"
58fi
59
60echo ""
61
62echo "----"
63echo "To start a Greenstone3 installation, enter:"
64echo " ant start"
65echo "----"
Note: See TracBrowser for help on using the repository browser.