You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
847 B
Bash
39 lines
847 B
Bash
#!/bin/bash
|
|
|
|
JARS_LOCATION="build/libs-all"
|
|
MAIN_CLASS="com.beanit.iec61850bean.app.ConsoleClient"
|
|
SYSPROPS=""
|
|
PARAMS=""
|
|
|
|
# Attempt to set APP_HOME (from Gradle start script)
|
|
# Resolve links: $0 may be a link
|
|
PRG="$0"
|
|
# Need this for relative symlinks.
|
|
while [ -h "$PRG" ] ; do
|
|
ls=`ls -ld "$PRG"`
|
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
if expr "$link" : '/.*' > /dev/null; then
|
|
PRG="$link"
|
|
else
|
|
PRG=`dirname "$PRG"`"/$link"
|
|
fi
|
|
done
|
|
SAVED="`pwd`"
|
|
cd "`dirname \"$PRG\"`/.." >/dev/null
|
|
APP_HOME="`pwd -P`"
|
|
cd "$SAVED" >/dev/null
|
|
|
|
CLASSPATH=$(JARS=("$APP_HOME"/"$JARS_LOCATION"/*.jar); IFS=:; echo "${JARS[*]}")
|
|
|
|
PARAMS=( )
|
|
SYSPROPS=( )
|
|
for i in "$@"; do
|
|
if [[ $i == -D* ]]; then
|
|
SYSPROPS+=( "$i" )
|
|
else
|
|
PARAMS+=( "$i" )
|
|
fi
|
|
done
|
|
|
|
java "${SYSPROPS[@]}" -cp "$CLASSPATH" $MAIN_CLASS "${PARAMS[@]}"
|