[37620] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
[37685] | 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
|
---|
[37620] | 5 |
|
---|
[37685] | 6 | store_pwd="$(pwd)"
|
---|
| 7 | full_progdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
|
---|
| 8 | cd "$full_progdir"
|
---|
[37620] | 9 |
|
---|
[37758] | 10 | if [ "x$GSDL3SRCHOME" = "x" ] ; then
|
---|
| 11 | if [ -f SETUP.bash ] ; then
|
---|
| 12 | . ./SETUP.bash
|
---|
| 13 | fi
|
---|
| 14 | fi
|
---|
| 15 |
|
---|
[37684] | 16 | if 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
|
---|
| 61 | fi
|
---|
| 62 |
|
---|
| 63 |
|
---|
| 64 | # If needed, add any further customized code needed here, such as
|
---|
| 65 | # environemnt variables
|
---|
| 66 |
|
---|
[37620] | 67 | ant stop
|
---|
[37684] | 68 |
|
---|
| 69 | # Any customized clean up needed?
|
---|