Skip to content

Commit f26b975

Browse files
committed
Begin porting of setup script
1 parent cd98013 commit f26b975

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

scripts/setup.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eEuo pipefail
55
DIR="$(dirname "$(readlink -f "$0")")"
66
BRANCH="${1:-main}"
77
ROS_DISTRO=${ROS_DISTRO:-"jazzy"}
8-
COLCON_WS="${COLCON_WS:-"$HOME/colcon_ws"}"
8+
COLCON_WS="${COLCON_WS:-"$HOME/bitbots_main"}"
99
REPO_URL="[email protected]:bit-bots/bitbots_main.git"
1010
SHELL_CONFIG="$(cat <<EOF
1111
@@ -22,7 +22,7 @@ export ROS_DOMAIN_ID=24
2222
export ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
2323
2424
# Set the default colcon workspace
25-
export COLCON_WS="\$HOME/colcon_ws"
25+
export COLCON_WS="\$HOME/bitbots_main"
2626
2727
# Set the default log level for colcon
2828
export COLCON_LOG_LEVEL=30
@@ -68,6 +68,7 @@ setup_ros() {
6868
fi
6969

7070
sudo apt update && sudo apt install -y \
71+
just \
7172
clang-format \
7273
cppcheck \
7374
python3-colcon-clean \
@@ -103,10 +104,10 @@ setup_repo() {
103104

104105
echo "Installing dependencies..."
105106
if (( has_sudo )); then
106-
make install
107+
just install
107108
else
108109
echo "Cannot use rosdep as it requires sudo."
109-
make install-no-root
110+
just install-no-root
110111
fi
111112
}
112113

@@ -118,12 +119,6 @@ setup_colcon() {
118119
git+https://github.com/timonegk/colcon-core.git@colors \
119120
git+https://github.com/timonegk/colcon-notification.git@colors \
120121
git+https://github.com/timonegk/colcon-output.git@colors
121-
122-
if [[ ! -d "$COLCON_WS/src/bitbots_main" ]]; then
123-
echo "Setting up colcon workspace in $COLCON_WS..."
124-
mkdir -p "$COLCON_WS/src"
125-
ln -s "$meta_dir" "$COLCON_WS/src/bitbots_main"
126-
fi
127122
}
128123

129124
build_repository() {
@@ -133,7 +128,7 @@ build_repository() {
133128
set +u
134129
source "/opt/ros/${ROS_DISTRO}/setup.bash"
135130

136-
colcon build --symlink-install --continue-on-error
131+
just build
137132
}
138133

139134
setup_shell_aliases() {

0 commit comments

Comments
 (0)