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

Last change on this file since 36573 was 36464, checked in by davidb, 21 months ago

Change to more consistent name

  • Property svn:executable set to *
File size: 903 bytes
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
43fi
44
Note: See TracBrowser for help on using the repository browser.