This commit is contained in:
parent
22c2ba0979
commit
b692bf57c0
|
@ -124,16 +124,24 @@ function roscd {
|
|||
return 0
|
||||
fi
|
||||
if [ -z $1 ]; then
|
||||
cd ${ROS_ROOT}
|
||||
if [ -z $ROS_WORKSPACE ]; then
|
||||
echo -e "No ROS_WORKSPACE set. Please set ROS_WORKSPACE to use roscd with no arguments."
|
||||
return 1
|
||||
fi
|
||||
cd ${ROS_WORKSPACE}
|
||||
return 0
|
||||
fi
|
||||
|
||||
_ros_decode_path $1 forceeval
|
||||
if [ $? != 0 ]; then
|
||||
echo "roscd: No such package '$1'"
|
||||
echo "roscd: No such package/stack '$1'"
|
||||
return 1
|
||||
elif [ -z $rosvals ]; then
|
||||
cd ${ROS_ROOT}
|
||||
if [ -z $ROS_WORKSPACE ]; then
|
||||
echo -e "No ROS_WORKSPACE set. Please set ROS_WORKSPACE to use roscd with no arguments."
|
||||
return 1
|
||||
fi
|
||||
cd ${ROS_WORKSPACE}
|
||||
return 0
|
||||
else
|
||||
cd ${rosvals[1]}${rosvals[2]}${rosvals[3]}
|
||||
|
|
Loading…
Reference in New Issue