-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
29 lines (28 loc) · 666 Bytes
/
run.sh
File metadata and controls
29 lines (28 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
DIR="$( cd -P "$( dirname "$0" )" && pwd )"
exitOnError()
{
rc=$?
if [[ $rc != 0 ]] ; then
echo ${1}' is missing from your PATH.'
exit $rc
fi
}
buildClasspath()
{
appDir=$1
classpath=$appDir/bin
IFS=$'\n'
classpath=$classpath:$appDir/config/
for jar in $appDir/lib/*
do
classpath=$classpath:$jar
done
}
javac -help > /dev/null 2>&1
exitOnError 'javac'
java -version > /dev/null 2>&1
exitOnError 'java'
buildClasspath "$DIR"/app
cmd="java -Dapplication.basedir=\"$DIR\" -classpath \"$classpath\" com.sandwich.koan.runner.AppLauncher "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9""
eval $cmd