source: main/trunk/greenstone3/ext-cli/get-selfcontained-jdk.sh@ 36415

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

Moved to new ext-cli folder

  • 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-jdk ] ; then
7 echo "Checking from svn: Greenstone3's selfcontained-jdk extension"
8 svn co https://svn.greenstone.org/gs3-extensions/selfcontained-jdk/trunk selfcontained-jdk
9
10 if [ $? != 0 ] ; then
11 echo "Error encountered checking out: " 1>&2
12 echo " svn co https://svn.greenstone.org/gs3-extensions/selfcontained-jdk/trunk selfcontained-jdk" 1>&2
13 exit 1
14 fi
15else
16 echo "Detected directory 'selfcontained-jdk'"
17 echo "=> Taken to mean that the svn check-out command has already been run"
18fi
19
20echo ""
21if [ ! -d selfcontained-jdk/zulu-jdk11-64bit ] ; then
22 echo "Runing the selfcontained-jdk/PREPARE-${OS_ALLCAPS}.sh"
23
24 cd selfcontained-jdk && ./PREPARE-${OS_ALLCAPS}.sh
25
26 if [ $? != 0 ] ; then
27 echo "Error encountered running: " 1>&2
28 echo " cd selfcontained-jdk && ./PREPARE-${OS_ALLCAPS}.sh" 1>&2
29 exit 1
30 fi
31
32else
33 echo "Detected directory 'selfcontained-jdk/zulu-jdk11-64bit'"
34 echo "=> Taken to mean that the selfcontained-jdk/PREPARE-${OS_ALLCAPS}.sh command has already been run"
35fi
36
37
38if [ "x$JAVA_HOME" != "x$PWD/selfcontained-jdk/zulu-jdk11-64bit" ] ; then
39 echo ""
40 echo "To use this installed version of JDK, run"
41 echo " cd selfcontained-jdk"
42 echo " source ./SETUP.bash"
43 echo " cd .."
44 echo ""
45else
46 echo ""
47 echo "Detected JAVA_HOME set to \$PWD/selfcontained-jdk/zulu-jdk11-64bit"
48 echo "=> Taken to mean that the selfcontained-jdk SETUP.bash file has been sourced"
49fi
50
51echo ""
Note: See TracBrowser for help on using the repository browser.