|
2 | 2 | set -eEuo pipefail |
3 | 3 |
|
4 | 4 | # static/global variables |
5 | | -ROS_DISTRO=${ROS_DISTRO:-"jazzy"} |
6 | 5 | DIR="$(dirname "$(readlink -f "$0")")" |
| 6 | +BRANCH="${1:-main}" |
| 7 | +ROS_DISTRO=${ROS_DISTRO:-"jazzy"} |
7 | 8 | COLCON_WS="${COLCON_WS:-"$HOME/colcon_ws"}" |
8 | 9 | REPO_URL="git@github.com:bit-bots/bitbots_main.git" |
9 | 10 | SHELL_CONFIG="$(cat <<EOF |
10 | 11 |
|
11 | 12 | # >>> bit-bots initialize >>> |
12 | 13 |
|
| 14 | +# Add python pip bins to PATH |
| 15 | +export PATH="\$HOME/.local/bin:\$PATH" |
| 16 | +
|
13 | 17 | # Ignore some deprecation warnings |
14 | 18 | export PYTHONWARNINGS="ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources,ignore:easy_install command is deprecated,ignore:setup.py install is deprecated" |
15 | 19 |
|
@@ -59,7 +63,7 @@ setup_ros() { |
59 | 63 | if [[ ! -f /etc/apt/sources.list.d/ros2.list ]]; then |
60 | 64 | echo "Adding ROS 2 repository..." |
61 | 65 | sudo apt install -y curl lsb-release |
62 | | - curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key > /usr/share/keyrings/ros-archive-keyring.gpg |
| 66 | + sudo sh -c "curl -fsSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key > /usr/share/keyrings/ros-archive-keyring.gpg" |
63 | 67 | sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main' > /etc/apt/sources.list.d/ros2.list" |
64 | 68 | fi |
65 | 69 |
|
@@ -89,7 +93,7 @@ setup_repo() { |
89 | 93 | else |
90 | 94 | if [[ ! -d "$PWD/bitbots_main" ]]; then |
91 | 95 | git clone "$REPO_URL" |
92 | | - git switch feature/jazzy-ubuntu2404-devcontainer |
| 96 | + git switch "$BRANCH" |
93 | 97 | fi |
94 | 98 |
|
95 | 99 | meta_dir="$(realpath "$PWD/bitbots_main")" |
|
0 commit comments