Skip to content

Commit 269511c

Browse files
authored
Merge pull request #174 from CWRUbotix/add-apt-source
Remove old GPG keys and use ros2-apt-source instead
2 parents cacc896 + b0b9f13 commit 269511c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.vscode/ros2_install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ sudo add-apt-repository universe -y
1111
# Adding ROS 2 repo to system
1212
sudo apt-get update
1313
sudo apt-get install curl -y
14-
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
15-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
14+
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
15+
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $UBUNTU_CODENAME)_all.deb"
16+
sudo apt install /tmp/ros2-apt-source.deb
1617

1718
# Install pip
1819
sudo apt-get install python3-pip -y

0 commit comments

Comments
 (0)