-
Notifications
You must be signed in to change notification settings - Fork 41
/
clean.sh
executable file
·89 lines (76 loc) · 1.47 KB
/
clean.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env bash
# clean all
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
build_folders=( \
thirdparty/tensorrtbuffers \
thirdparty/dbow2 \
thirdparty/rosbag \
)
for folder in "${build_folders[@]}"
do
echo "cleaning build $folder ..."
if [[ -d $folder ]]; then
cd $folder
if [[ -d build ]]; then
cd build
make clean
cd ..
rm -Rf build
fi
if [[ -d install ]]; then
rm -Rf install
fi
if [[ -d lib ]]; then
rm -Rf lib
fi
cd $SCRIPT_DIR
fi
done
#remove symbolic links
if [ -e thirdparty/tensorrtbuffers ]; then
if [ -d thirdparty/tensorrtbuffers/build ]; then
rm -Rf thirdparty/tensorrtbuffers/build
fi
rm -Rf thirdparty/tensorrtbuffers
fi
if [ -d thirdparty/TensorRT ]; then
rm -Rf thirdparty/TensorRT
fi
# ==========================================
git_folders=( \
thirdparty/pangolin \
thirdparty/sophus \
thirdparty/ceres \
thirdparty/gtsam \
thirdparty/g2o \
thirdparty/mahigui \
thirdparty/json \
thirdparty/sesync \
thirdparty/obindex2 \
thirdparty/ibow-lcd \
thirdparty/dbow3 \
thirdparty/rerun \
thirdparty/tracy \
)
for folder in "${git_folders[@]}"; do
echo "cleaning git $folder ..."
if [[ -d $folder ]]; then
cd $folder
if [[ -d build ]]; then
rm -Rf build
fi
if [[ -d install ]]; then
rm -Rf install
fi
if [[ -d lib ]]; then
rm -Rf lib
fi
cd $SCRIPT_DIR
fi
rm -Rf $folder
done
echo "cleaning build ..."
if [[ -d build ]]; then
rm -Rf build
fi