forked from OpenDroneMap/WebODM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devenv.sh
executable file
·47 lines (40 loc) · 949 Bytes
/
devenv.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
#!/bin/bash
set -eo pipefail
__dirname=$(cd $(dirname "$0"); pwd -P)
${__dirname}/webodm.sh checkenv
usage(){
echo "Usage: $0 <command> [options]"
echo
echo "This program helps to setup a development environment for WebODM using docker."
echo
echo "Command list:"
echo " start Start the development environment"
echo " stop Stop the development environment"
echo " runtests Run unit tests"
exit
}
run(){
echo $1
eval $1
}
start(){
run "docker-compose -f docker-compose.yml -f docker-compose.nodeodm.yml -f docker-compose.dev.yml up"
}
stop(){
run "${__dirname}/webodm.sh stop"
}
runtests(){
run "docker-compose exec webapp /bin/bash -c \"/webodm/webodm.sh test\""
}
if [[ $1 = "start" ]]; then
echo "Starting development environment..."
start
elif [[ $1 = "stop" ]]; then
echo "Stopping development environment..."
stop
elif [[ $1 = "runtests" ]]; then
echo "Starting tests..."
runtests "$2"
else
usage
fi