-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-travart.sh
More file actions
executable file
·53 lines (44 loc) · 1.39 KB
/
debug-travart.sh
File metadata and controls
executable file
·53 lines (44 loc) · 1.39 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/sh
#*******************************************************************************
# TODO: explanation what the class does
#
# @author Kevin Feichtinger
#
# Copyright 2023 Johannes Kepler University Linz
# LIT Cyber-Physical Systems Lab
# All rights reserved
#*******************************************************************************
# Note that the necessary jars should already be in the plugins/ directory as JAR files
# create a runner directory inside TraVarT
rm -fr travart-run
mkdir -p travart-run/plugins
# create a JAR of the app
mvn clean package -DskipTests
# copy required files into travart-run
cp plugins/*.jar travart-run/plugins
cp target/travart-*-SNAPSHOT.zip travart-run
cp -r src/main/resources travart-run/resources
# change the current directory
cd travart-run || exit
# delete exting file
rm -f plugins/enabled.txt
# create a new enabled.txt
touch plugins/enabled.txt
# generate enabled.txt
delimiter="-plugin"
for filename in plugins/*.jar; do
basefilename=$(basename -- "$filename")
s=$basefilename$delimiter
array=();
while [[ $s ]]; do
array+=( "${s%%"$delimiter"*}" );
s=${s#*"$delimiter"};
done;
echo ${array}"-plugin" >> plugins/enabled.txt
done
# unzip app
jar xf travart-*.zip
rm travart-*.zip
# run travart
mv travart-*-SNAPSHOT.jar travart.jar
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8080 travart.jar