Skip to content

Commit fe055de

Browse files
committed
[jsk_tools/test/env_hooks] Update test sh
1 parent 763e2d0 commit fe055de

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

jsk_tools/test/sh/rossetip.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/bash
22

3-
_THIS_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)
4-
source $_THIS_DIR/../../env-hooks/99.jsk_tools.bash
3+
JSK_TOOLS_PATH=$(rospack find jsk_tools)
4+
if [ "$JSK_TOOLS_PATH" = "/opt/ros/${ROS_DISTRO}/share/jsk_tools" ]; then
5+
source /opt/ros/${ROS_DISTRO}/setup.bash
6+
else
7+
source `catkin locate --shell-verbs`
8+
cd $(rospack find jsk_tools) && source $(catkin locate)/devel/etc/catkin/profile.d/99.jsk-tools.sh
9+
fi
510

611
ECHO_OUTPUT="$1"
712
ip() {

jsk_tools/test/sh/rossetmaster.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/bash
22

3-
_THIS_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)
4-
source $_THIS_DIR/../../env-hooks/99.jsk_tools.bash
3+
JSK_TOOLS_PATH=$(rospack find jsk_tools)
4+
if [ "$JSK_TOOLS_PATH" = "/opt/ros/${ROS_DISTRO}/share/jsk_tools" ]; then
5+
source /opt/ros/${ROS_DISTRO}/setup.bash
6+
else
7+
source `catkin locate --shell-verbs`
8+
cd $(rospack find jsk_tools) && source $(catkin locate)/devel/etc/catkin/profile.d/99.jsk-tools.sh
9+
fi
510

611
rossetmaster "$1" "${2-11311}" > /dev/null 2>&1
712
echo $ROS_MASTER_URI

0 commit comments

Comments
 (0)