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

Last change on this file was 38983, checked in by anupama, 3 weeks ago

I think these are all the changes needed for tthe new GS3 ext/DEACTIVATE.sh (and ext/ACTIVATE.sh) to (de)activate the webswing extension.

  • Property svn:executable set to *
File size: 1.7 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 if [[ "$gsdl_ext" == *.inactive ]]; then
27 echo "Skipping inactive extension $gsdl_ext"
28 continue
29 fi
30 # Sourcing first for settings, then run ext's 'start' script if it exists
31 if [ -d $gsdl_ext ] ; then
32 cd $gsdl_ext > /dev/null
33 if [ -f ant-start-settings.bash ]; then
34 . ./ant-start-settings.bash
35 fi
36 if [ -f ant-start.sh ]; then
37 ./ant-start.sh
38 fi
39 cd ../..
40 fi
41 done
42 fi
43
44 # Check Greenstone2 extensions
45 if [ -d gs2build/ext ] ; then
46 for gsdl_ext in gs2build/ext/* ; do
47 if [[ "$gsdl_ext" == *.inactive ]]; then
48 echo "Skipping inactive extension $gsdl_ext"
49 continue
50 fi
51 # Sourcing first for settings, then run ext's 'start' script if it exists
52 if [ -d $gsdl_ext ] ; then
53 cd $gsdl_ext > /dev/null
54 if [ -f ant-start-settings.bash ]; then
55 . ./ant-start-settings.bash
56 fi
57 if [ -f ant-start.sh ]; then
58 ./ant-start.sh
59 fi
60 cd ../../..
61 fi
62 done
63 fi
64fi
65
66
67# If needed, add any further customized code needed here, such as
68# environemnt variables
69
70
71ant start
72
73# Any customized clean up needed?
74
75
76cd "$store_pwd"
Note: See TracBrowser for help on using the repository browser.