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

Last change on this file was 37758, checked in by anupama, 11 months ago

The ant-stop-with-exts.sh script also needs to source gs3-setup.sh to locate ant, just like the ant-start-with-exts script. The ant-restart and ant-logreset-restart merely call these 2 scripts, so they don't need extra work.

  • 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-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 # Run ext's 'stop' script if it exists,
27 # Then source ant-stop-settings.bash in case there are any variables
28 # the script wants to unset/restore to previous value
29 if [ -d $gsdl_ext ] ; then
30 cd $gsdl_ext > /dev/null
31 if [ -f ant-stop.sh ]; then
32 ./ant-stop.sh
33 fi
34 if [ -f ant-stop-settings.bash ]; then
35 . ./ant-stop-settings.sh
36 fi
37 cd ../..
38
39 fi
40 done
41 fi
42
43 # Check Greenstone2 extensions
44 if [ -d gs2build/ext ] ; then
45 for gsdl_ext in gs2build/ext/* ; do
46 # Run ext's 'stop' script if it exists,
47 # Then source ant-stop-settings.bash in case there are any variables
48 # the script wants to unset/restore to previous value
49 if [ -d $gsdl_ext ] ; then
50 cd $gsdl_ext > /dev/null
51 if [ -f ant-stop.sh ]; then
52 ./ant-stop.sh
53 fi
54 if [ -f ant-stop-settings.bash ]; then
55 . ./ant-stop-settings.bash
56 fi
57 cd ../../..
58 fi
59 done
60 fi
61fi
62
63
64# If needed, add any further customized code needed here, such as
65# environemnt variables
66
67ant stop
68
69# Any customized clean up needed?
Note: See TracBrowser for help on using the repository browser.