source: main/trunk/greenstone3/ant-stop-with-exts.sh@ 38983

Last change on this file since 38983 was 38983, checked in by anupama, 4 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.9 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-stop extension settings (ant-stop.sh)"
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 # Run ext's 'stop' script if it exists,
31 # Then source ant-stop-settings.bash in case there are any variables
32 # the script wants to unset/restore to previous value
33 if [ -d $gsdl_ext ] ; then
34 cd $gsdl_ext > /dev/null
35 if [ -f ant-stop.sh ]; then
36 ./ant-stop.sh
37 fi
38 if [ -f ant-stop-settings.bash ]; then
39 . ./ant-stop-settings.sh
40 fi
41 cd ../..
42
43 fi
44 done
45 fi
46
47 # Check Greenstone2 extensions
48 if [ -d gs2build/ext ] ; then
49 for gsdl_ext in gs2build/ext/* ; do
50 if [[ "$gsdl_ext" == *.inactive ]]; then
51 echo "Skipping inactive extension $gsdl_ext"
52 continue
53 fi
54 # Run ext's 'stop' script if it exists,
55 # Then source ant-stop-settings.bash in case there are any variables
56 # the script wants to unset/restore to previous value
57 if [ -d $gsdl_ext ] ; then
58 cd $gsdl_ext > /dev/null
59 if [ -f ant-stop.sh ]; then
60 ./ant-stop.sh
61 fi
62 if [ -f ant-stop-settings.bash ]; then
63 . ./ant-stop-settings.bash
64 fi
65 cd ../../..
66 fi
67 done
68 fi
69fi
70
71
72# If needed, add any further customized code needed here, such as
73# environemnt variables
74
75ant stop
76
77# Any customized clean up needed?
Note: See TracBrowser for help on using the repository browser.