#!/bin/bash -p

# $Id: gradle-gui 4696 2011-11-04 13:30:47Z unsaved $
# Distribution is permitted under the terms of the HSQLDB license.
# (c) 2011 The HSQL Development Group

# This script automatically 'cd's to directory .../testrun/sqltool in which
# it resides, so that it may be safely executed from desktop managers, etc.
# The main work script, "runtests.groovy" does not have this limitation.
#
# author: Blaine Simpson of the HSQL Development Group

case "$0" in
/*) SCRIPTDIR="${0%/*}";; */*) SCRIPTDIR="$PWD/${0%/*}";; *) SCRIPTDIR="$PWD";;
esac
case "$SCRIPTDIR" in *?/.) SCRIPTDIR="${SCRIPTDIR%/.}"; esac

cd "$SCRIPTDIR"

# If there is no settings file in place, start user with our customized one:
[ -e gradle-app.setting ] || cp gui-initial.setting gradle-app.setting

# Change JVM settings here:
exec ./gradlew --gui "$@" &
