This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
forked from moos-ivp/svn-mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·55 lines (47 loc) · 1.75 KB
/
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
#!/bin/bash
CLEAN="no"
BUILD_BOT_CODE_ONLY="OFF"
print_usage_and_exit()
{
printf "build.sh [OPTIONS] [MAKE ARGS] \n"
printf "Options: \n"
printf " --help, -h \n"
printf " --minrobot, -m \n"
printf " Only build minimal robot apps \n"
printf " --clean, -c \n"
printf " Invokes make clean and removes build/* \n"
exit 1
}
for ARGI; do
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
print_usage_and_exit;
elif [ "${ARGI}" = "--clean" -o "${ARGI}" = "-c" ] ; then
CLEAN="yes"
elif [ "${ARGI}" = "--minrobot" -o "${ARGI}" = "-m" ] ; then
BUILD_BOT_CODE_ONLY="ON"
fi
done
INVOC_ABS_DIR="$(pwd)"
SCRIPT_ABS_DIR="$(cd $(dirname "$0") && pwd -P)"
cd "${SCRIPT_ABS_DIR}"
if [ ${CLEAN} = "yes" ] ; then
printf "=========================================\n"
printf "CLEANING both MOOS and IVP \n"
printf "Note: You may have to manually clean MOOS\n"
printf "=========================================\n"
./build-moos.sh --clean
./build-ivp.sh --clean
elif [ ${BUILD_BOT_CODE_ONLY} = "ON" ] ; then
printf "===========================================================\n"
printf "BUILDING MOOS and IvP code in min-robot mode (no GUI Apps) \n"
printf "===========================================================\n"
./build-moos.sh -m
./build-ivp.sh -m
else
printf "=========================================\n"
printf "BUILDING All MOOS and IvP code \n"
printf "=========================================\n"
./build-moos.sh
./build-ivp.sh
fi
cd "${INVOC_ABS_DIR}"