source: main/trunk/greenstone3/ext-cli/get-selfcontained-ant.sh@ 36436

Last change on this file since 36436 was 36436, checked in by davidb, 20 months ago

Print statement instructions updated

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2
3OS_ALLCAPS=`uname | tr 'a-z' 'A-Z'`
4
5echo ""
6if [ ! -d selfcontained-ant ] ; then
7 echo "Checking from svn: Greenstone3's selfcontained-ant extension"
8 svn co https://svn.greenstone.org/gs3-extensions/selfcontained-ant/trunk selfcontained-ant
9
10 if [ $? != 0 ] ; then
11 echo "Error encountered checking out: " 1>&2
12 echo " svn co https://svn.greenstone.org/gs3-extensions/selfcontained-ant/trunk selfcontained-ant" 1>&2
13 exit 1
14 fi
15else
16 echo "Detected directory 'selfcontained-ant'"
17 echo "=> Taken to mean that the svn check-out command has already been run"
18fi
19
20echo ""
21if [ ! -d selfcontained-ant/apache-ant ] ; then
22 echo "Runing the selfcontained-ant/PREPARE-${OS_ALLCAPS}.sh"
23
24 cd selfcontained-ant && ./PREPARE-${OS_ALLCAPS}.sh
25
26 if [ $? != 0 ] ; then
27 echo "Error encountered running: " 1>&2
28 echo " cd selfcontained-ant && ./PREPARE-${OS_ALLCAPS}.sh" 1>&2
29 exit 1
30 fi
31
32else
33 echo "Detected directory 'selfcontained-ant/apache-ant'"
34 echo "=> Taken to mean that the selfcontained-ant/PREPARE-${OS_ALLCAPS}.sh command has already been run"
35fi
36
37
38if [ "x$JAVA_HOME" != "x$PWD/selfcontained-ant/apache-ant" ] ; then
39 echo ""
40 echo "To use this installed version of Apache Ant, in the top-level Greenstone3 directory run:"
41 echo " source ./gs3-setup-cli.sh"
42 echo ""
43else
44 echo ""
45 echo "Detected JAVA_HOME set to \$PWD/selfcontained-ant/apache-ant"
46 echo "=> Taken to mean that the selfcontained-ant SETUP.sh file has been sourced"
47fi
48
49echo ""
Note: See TracBrowser for help on using the repository browser.