Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
  • Loading branch information
sloretz committed Jan 24, 2020
1 parent 35c874f commit a42c76e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/rosbash/scripts/rosrun
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,13 @@ if [[ ! $file_name == */* ]]; then
catkin_package_share_dirs=($(catkin_find --without-underlays --share "$pkg_name" 2> /dev/null))
debug "Looking in catkin share dirs: $IFS$(catkin_find --without-underlays --share "$pkg_name" 2>&1)"

first_libexec=$(inonedir "${exepathlist[0]}" "${catkin_package_libexec_dirs[@]}")
first_share=$(inonedir "${exepathlist[0]}" "${catkin_package_share_dirs[@]}")
second_libexec=$(inonedir "${exepathlist[1]}" "${catkin_package_libexec_dirs[@]}")
second_share=$(inonedir "${exepathlist[1]}" "${catkin_package_share_dirs[@]}")

if [[ $first_libexec == "yes" && $first_share == "no" && $second_share == "yes" ]]; then
if [[ $first_share == "no" && $second_share == "yes" ]]; then
debug "Assuming ${exepathlist[0]} is a devel-space relay for ${exepathlist[1]}"
exepathlist=(${exepathlist[0]})
elif [[ $second_libexec == "yes" && $second_share == "no" && $first_share == "yes" ]]; then
elif [[ $second_share == "no" && $first_share == "yes" ]]; then
debug "Assuming ${exepathlist[1]} is a devel-space relay for ${exepathlist[0]}"
exepathlist=(${exepathlist[1]})
fi
Expand Down

0 comments on commit a42c76e

Please sign in to comment.