-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcompile-all.sh
executable file
·64 lines (49 loc) · 1.26 KB
/
compile-all.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
61
62
#!/usr/bin/env bash
STARTING_DIR=`pwd`
echo STARTING_DIR: $STARTING_DIR
set -e
source ~/.bashrc
echo "VREP_ROOT_DIR: $VREP_ROOT_DIR"
source source-all.bash
cd $PATROLLING3D_HOME
# get into mapping_ws and compile it
cd mapping_ws
if [ ! -f src/CMakeLists.txt ]; then
cd src
catkin_init_workspace
cd ..
fi
catkin build -DCMAKE_BUILD_TYPE=Release
cd $PATROLLING3D_HOME
source source-all.bash
# get into patrolling_ws and compile it
cd patrolling_ws
if [ ! -f src/CMakeLists.txt ]; then
cd src
catkin_init_workspace
cd ..
fi
#catkin_make -DCMAKE_BUILD_TYPE=Release
catkin build -DCMAKE_BUILD_TYPE=Release
cd $PATROLLING3D_HOME
# check if the vrep lib is synched
echo ""
LIB_VREP=libv_repExtRos.so
if [ -f patrolling_ws/devel/lib/$LIB_VREP ]; then
if [ ! -f $VREP_ROOT_DIR/$LIB_VREP ]; then
echo "copying libv_repExtRos.so in $VREP_ROOT_DIR"
sudo cp patrolling_ws/devel/lib/$LIB_VREP $VREP_ROOT_DIR
fi
DIFF_LIB=$(diff patrolling_ws/devel/lib/$LIB_VREP $VREP_ROOT_DIR)
if [ "$DIFF_LIB" != "" ]; then
echo "copying libv_repExtRos.so in $VREP_ROOT_DIR"
sudo cp patrolling_ws/devel/lib/$LIB_VREP $VREP_ROOT_DIR
else
echo "$LIB_VREP synched"
fi
else
echo "you still need to compile vrep package"
fi
echo ""
# go back to starting dir
cd $STARTING_DIR