-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·57 lines (45 loc) · 777 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·57 lines (45 loc) · 777 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
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
#!/bin/bash
set -e
# Define help message
show_help() {
echo """
Commands
---------------------------------------------------------
bash : run bash
eval : eval shell command
build : build the app [arg: path to cmake folder]
run : run the application [arg: path to program]
test : test the application
"""
}
build(){
cd "./build"
cmake ..
cmake --build .
}
case "$1" in
bash )
bash
;;
eval )
eval "${@:2}"
;;
build )
build
;;
test )
eval "./build/tests/tests ${@:2}"
;;
run )
eval "./build/main/app ${@:2}"
;;
ftest )
build && eval "./tests/tests ${@:2}"
;;
frun )
build && eval "./main/app ${@:2}"
;;
* )
show_help
;;
esac