-
Notifications
You must be signed in to change notification settings - Fork 0
/
cleanup_and_build.sh
executable file
·25 lines (16 loc) · 1.08 KB
/
cleanup_and_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
#!/bin/bash
cd ~/Humanoid/catkin_ws/ || { echo "Failed to navigate to catkin_ws"; exit 1; }
echo "Cleaning catkin build..."
catkin clean -b --yes || { echo "Failed to clean catkin build"; exit 1; }
cd src/xsens_ros_mti_driver/lib/xspublic/ || { echo "Failed to navigate to xsens_ros_mti_driver lib/xspublic"; exit 1; }
echo "Cleaning xsens_ros_mti_driver make files..."
make clean || { echo "Failed to clean xsens_ros_mti_driver"; exit 1; }
cd ~/Humanoid/catkin_ws/src/ || { echo "Failed to navigate back to src"; exit 1; }
echo "Changing permissions for xsens_ros_mti_driver..."
sudo chmod o+rw xsens_ros_mti_driver/ || { echo "Failed to change permissions for xsens_ros_mti_driver"; exit 1; }
echo "Building xsens_ros_mti_driver..."
pushd xsens_ros_mti_driver/lib/xspublic && make && popd || { echo "Failed to build xsens_ros_mti_driver"; exit 1; }
cd ~/Humanoid/catkin_ws/src/ || { echo "Failed to navigate to catkin_ws/src"; exit 1; }
echo "Building the catkin workspace..."
catkin build || { echo "Failed to build the catkin workspace"; exit 1; }
echo "Build and cleanup completed successfully."