-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_MASTA.sh
39 lines (37 loc) · 1.15 KB
/
run_MASTA.sh
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
30
31
32
33
34
35
36
37
38
39
# should only be used on UNIX, LINUX, MACOSX systems!!! win32 and dos related systems will not work
# remove all *.class files do:
# find -name "*.class" -exec rm -f {} \;
#argument(s) required:
# 1 -> platform: linux, osx
# 2 -> execution: y, n
# 3 -> arch: x86, x64
echo "Running from $(pwd)"
if [ ! $# -eq 0 ] ; then
if [ "$1" == "linux" ] ; then
bash run_STLOSX.sh "$3"
elif [ "$1" == "osx" ] ; then
bash run_STLOSX.sh "$3"
else
bash run_STLDOS.sh "$3"
fi
if [ ! -d "h_out" ] ; then
mkdir h_out
else
rm -rf h_out
mkdir h_out
fi
VAR_JARS=""
for i in $(ls ./lib) ; do
if [[ $i =~ .*\.jar$ ]] ; then
VAR_JARS+="lib/$i:"
fi
done
if [ "$2" == "y" ] ; then
VAR_JARS=${VAR_JARS::len-1}
CURR_PATH=$(pwd)
echo $VAR_JARS
find -name "*.java" > sources.gen
${JAVA_HOME}/bin/javac -d \"$CURR_PATH"h_out/"\" --source-path "@sources.gen" -cp "$VAR_JARS"
${JAVA_HOME}/bin/java -Xdiag -XX:+ShowCodeDetailsInExceptionMessages -Djava.library.path="hlib" -cp "$CURR_PATH/h_out:$VAR_JARS" com.jackmeng.Halcyon
fi
fi