source: main/trunk/greenstone3/ant-start-with-exts.sh

Last change on this file was 37746, checked in by anupama, 12 months ago

Dr Bainbridge has fixed up the base ant-start-with-exts script (that other ant-start scripts also call) to do what service.d/greenstone3-start.sh does first before it launches the GS3 server as a service. Which is: to setup the GS3 environment as usual. This is especially needed for WebSwing GLI to work properly.

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2
3# This script can be run from any directory, but the script file itself
4# NEEDS TO BE IN THE TOP-LEVEL GREENSTONE3 SRC HOME DIRECTORY
5
6store_pwd="$(pwd)"
7full_progdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
8cd "$full_progdir"
9
10if [ "x$GSDL3SRCHOME" = "x" ] ; then
11 if [ -f SETUP.bash ] ; then
12 . ./SETUP.bash
13 fi
14fi
15
16if test "x$gsopt_noexts" != "x1" ; then
17
18 echo ""
19 echo "----"
20 echo "Checking for custom ant-start extension settings (ant-start-settings.bash)"
21 echo "----"
22
23 # Check Greenstone3 extensions
24 if [ -d ext ] ; then
25 for gsdl_ext in ext/* ; do
26 # Sourcing first for settings, then run ext's 'start' script if it exists
27 if [ -d $gsdl_ext ] ; then
28 cd $gsdl_ext > /dev/null
29 if [ -f ant-start-settings.bash ]; then
30 . ./ant-start-settings.bash
31 fi
32 if [ -f ant-start.sh ]; then
33 ./ant-start.sh
34 fi
35 cd ../..
36 fi
37 done
38 fi
39
40 # Check Greenstone2 extensions
41 if [ -d gs2build/ext ] ; then
42 for gsdl_ext in gs2build/ext/* ; do
43 # Sourcing first for settings, then run ext's 'start' script if it exists
44 if [ -d $gsdl_ext ] ; then
45 cd $gsdl_ext > /dev/null
46 if [ -f ant-start-settings.bash ]; then
47 . ./ant-start-settings.bash
48 fi
49 if [ -f ant-start.sh ]; then
50 ./ant-start.sh
51 fi
52 cd ../../..
53 fi
54 done
55 fi
56fi
57
58
59# If needed, add any further customized code needed here, such as
60# environemnt variables
61
62
63ant start
64
65# Any customized clean up needed?
66
67
68cd "$store_pwd"
Note: See TracBrowser for help on using the repository browser.