Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use _rosrun_ prefix for temporary variable #228

Merged
merged 1 commit into from
Sep 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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