Skip to content

Commit

Permalink
Merge pull request #10 from ETHZ-RobotX/release/v1.1.1
Browse files Browse the repository at this point in the history
Release/v1.1.1
  • Loading branch information
deepanaishtaweera authored Jun 29, 2024
2 parents c180a8f + 1877852 commit 9a70a47
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ Changelog
* Comment `pull_policy` in `compose.yaml` to avoid pulling images on every run
* Do not `vcs pull` if `src` exists

1.1.1 (2024-06-29)
--------------
* Fix `connect-smb` shell alias.

30 changes: 24 additions & 6 deletions scripts/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,30 @@ echo "source /usr/share/vcstool-completion/vcs.bash" >> ~/.bashrc
echo "source /usr/share/vcstool-completion/vcs.zsh" >> ~/.zshrc

# Setup alias
echo "alias wssetup=\"source ${ROOT}/devel/setup.bash\"" >> ~/.bashrc
echo "alias wssetup=\"source ${ROOT}/devel/setup.zsh\"" >> ~/.zshrc
echo "alias build-limit=\"catkin build --jobs 8 --mem-limit 70%\"" >> ~/.bashrc
echo "alias build-limit=\"catkin build --jobs 8 --mem-limit 70%\"" >> ~/.zshrc
echo "alias connect-smb=\"export ROS_MASTER_URI=http://\$(ip route show default | grep -oP 'via \K\d+\.\d+\.\d+').5:11311 ; export ROS_IP=\$(ip route get 8.8.8.8 | grep -oP '(?<=src )\S+') ; echo 'ROS_MASTER_URI and ROS_IP set to ' ; printenv ROS_MASTER_URI ; printenv ROS_IP\"" >> ~/.bashrc
echo "alias connect-smb=\"export ROS_MASTER_URI=http://\$(ip route show default | grep -oP 'via \K\d+\.\d+\.\d+').5:11311 ; export ROS_IP=\$(ip route get 8.8.8.8 | grep -oP '(?<=src )\S+') ; echo 'ROS_MASTER_URI and ROS_IP set to ' ; printenv ROS_MASTER_URI ; printenv ROS_IP\"" >> ~/.zshrc
echo "alias wssetup='source ${ROOT}/devel/setup.bash'" >> ~/.bashrc
echo "alias wssetup='source ${ROOT}/devel/setup.zsh'" >> ~/.zshrc
echo "alias build-limit='catkin build --jobs 8 --mem-limit 70%'" >> ~/.bashrc
echo "alias build-limit='catkin build --jobs 8 --mem-limit 70%'" >> ~/.zshrc

cat <<'EOF' >> ~/.bashrc
connect-smb() {
export ROS_MASTER_URI=http://$(ip route show default | grep -oP 'via \K\d+\.\d+\.\d+').5:11311
export ROS_IP=$(ip route get 8.8.8.8 | grep -oP '(?<=src )\S+')
echo 'ROS_MASTER_URI and ROS_IP set to '
printenv ROS_MASTER_URI
printenv ROS_IP
}
EOF

cat <<'EOF' >> ~/.zshrc
connect-smb() {
export ROS_MASTER_URI=http://$(ip route show default | grep -oP 'via \K\d+\.\d+\.\d+').5:11311
export ROS_IP=$(ip route get 8.8.8.8 | grep -oP '(?<=src )\S+')
echo 'ROS_MASTER_URI and ROS_IP set to '
printenv ROS_MASTER_URI
printenv ROS_IP
}
EOF

# Make folder `src` if not exists
if [ ! -d "${ROOT}/src" ]; then
Expand Down

0 comments on commit 9a70a47

Please sign in to comment.