-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple_build.sh
executable file
·60 lines (50 loc) · 1.03 KB
/
simple_build.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#chmod +x run_build.sh
#!/bin/bash
BUILD_DIR="$PWD/build"
SOURCE_DIR="$PWD"
BUILD=0
RUN_TEST=0
RUN_GEN=0
RUN_RAD=0
while getopts ":btgr" opt; do
case ${opt} in
b )
BUILD=1
;;
t )
RUN_TEST=1
;;
g )
RUN_GEN=1
;;
r )
RUN_RAD=1
;;
\? )
echo "-- Failed to parse arguments" 1>&2
;;
esac
done
if [ $BUILD -eq 1 ]; then
echo "-- Building..."
cmake -S "$SOURCE_DIR" -B "$BUILD_DIR"
cmake --build "$BUILD_DIR"
echo "-- Build complete"
fi
cd "$SOURCE_DIR/extern/marley"
source ./setup_marley.sh
cd "$SOURCE_DIR"
if [ $RUN_TEST -eq 1 ]; then
cd "$SOURCE_DIR/system"
./lumilar -g generator/gun_electron_mono.mac -d detector/debug_tpc.mac
fi
if [ $RUN_GEN -eq 1 ]; then
cd "$SOURCE_DIR/system"
./lumilar -g generator/marley_unif.mac -d detector/dune_solar.mac
fi
if [ $RUN_RAD -eq 1 ]; then
cd "$SOURCE_DIR/system"
./lumilar -g generator/bxdecay0_debug.mac -d detector/debug_tpc.mac
fi
cd "$SOURCE_DIR"
# ./run_build.sh -b -t -g -r