Skip to content

Commit

Permalink
use _rosrun_ prefix for temporary variable (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Sep 17, 2019
1 parent 91800bc commit 3e9dcb2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/rosbash/scripts/rosrun
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ case $2 in
esac

if [[ -n $CMAKE_PREFIX_PATH ]]; then
_rosbash_IFS="$IFS"
_rosrun_IFS="$IFS"
IFS=$'\n'
catkin_package_libexec_dirs=($(catkin_find --without-underlays --libexec --share "$1" 2> /dev/null))
debug "Looking in catkin libexec dirs: $IFS$(catkin_find --without-underlays --libexec --share "$1" 2>&1)"
IFS="$_rosbash_IFS"
unset _rosbash_IFS
IFS="$_rosrun_IFS"
unset _rosrun_IFS
fi
pkgdir=$(rospack find "$1")
debug "Looking in rospack dir: $pkgdir"
Expand All @@ -71,11 +71,11 @@ if [[ ! $2 == */* ]]; then
fi
debug "Searching for $2 with permissions $_perm"
exepathlist="$(find -L "${catkin_package_libexec_dirs[@]}" "$pkgdir" -name "$2" -type f -perm "$_perm" ! -regex ".*$pkgdir\/build\/.*" | uniq)"
_rosbash_IFS="$IFS"
_rosrun_IFS="$IFS"
IFS=$'\n'
exepathlist=($exepathlist)
IFS="$_rosbash_IFS"
unset _rosbash_IFS
IFS="$_rosrun_IFS"
unset _rosrun_IFS
unset _perm
if [[ ${#exepathlist[@]} == 0 ]]; then
echo "[rosrun] Couldn't find executable named $2 below $pkgdir"
Expand Down

0 comments on commit 3e9dcb2

Please sign in to comment.