-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebuildall
executable file
·35 lines (27 loc) · 886 Bytes
/
rebuildall
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
#!/bin/bash
##########################
####### REBUILDALL #######
##########################
#
# Author: Jacob Hassold <[email protected]>
#
# Completely refreshes the ROS 2 workspace located in ~/ros2_ws
# Follows the steps described in "Maintaining a Source Checkout" in the ros.org index
# Assumes you want the master branch of all repositories
cd ~/ros2_ws
# Update repository list
mv -i ros2.repos ros2.repos.old
wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
# Update repositories
vcs custom --args remote update
# Download new source code
vcs import src < ros2.repos
vcs pull src
# Remove old build, install, and log folders
rm -r ./build
rm -r ./install
rm -r ./log
# Rebuild the workspace
colcon build --symlink-install --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# Returns to the directory that we started in (before the first command)
cd -