#!/bin/bash

# This script can be run from any directory, but the script file itself
# NEEDS TO BE IN THE TOP-LEVEL GREENSTONE3 SRC HOME DIRECTORY

store_pwd="$(pwd)"
full_progdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
cd "$full_progdir"

# Need to source gs3-setup.sh so environment suitable set to run
# the 'ant reset-logs;

if [ "x$GSDL3SRCHOME" = "x" ] ; then
    if [ -f gs3-setup.sh ] ; then
        . ./gs3-setup.sh
    fi
fi

./ant-stop-with-exts.sh && ant reset-logs && ./ant-start-with-exts.sh


cd "$store_pwd"

