Codebase list ros-ros / 9b4ebfd
rosrun: replaced `...` with $(...) (#175) Christopher Wecht authored 6 years ago Dirk Thomas committed 6 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
4848
4949 if [[ -n $CMAKE_PREFIX_PATH ]]; then
5050 IFS=$'\n'
51 catkin_package_libexec_dirs=(`catkin_find --without-underlays --libexec --share "$1" 2> /dev/null`)
51 catkin_package_libexec_dirs=($(catkin_find --without-underlays --libexec --share "$1" 2> /dev/null))
5252 unset IFS
5353 debug "Looking in catkin libexec dirs: $catkin_package_libexec_dirs"
5454 fi
55 pkgdir=`rospack find "$1"`
55 pkgdir=$(rospack find "$1")
5656 debug "Looking in rospack dir: $pkgdir"
5757 if [[ ${#catkin_package_libexec_dirs[@]} -eq 0 && -z $pkgdir ]]; then
5858 exit 2
6161 # The -perm /mode usage is not available in find on the Mac
6262 #exepathlist=(`find $pkgdir -name $2 -type f -perm /u+x,g+x,o+x`)
6363 # -L: #3475
64 if [[ `uname` == Darwin ]]; then
64 if [[ $(uname) == Darwin ]]; then
6565 _perm="+111"
6666 else
6767 _perm="/111"
6868 fi
6969 debug "Searching for $2 with permissions $_perm"
70 exepathlist="`find -L "${catkin_package_libexec_dirs[@]}" "$pkgdir" -name "$2" -type f -perm "$_perm" ! -regex ".*$pkgdir\/build\/.*" | uniq`"
70 exepathlist="$(find -L "${catkin_package_libexec_dirs[@]}" "$pkgdir" -name "$2" -type f -perm "$_perm" ! -regex ".*$pkgdir\/build\/.*" | uniq)"
7171 IFS=$'\n'
7272 exepathlist=($exepathlist)
7373 unset IFS
7474 unset _perm
7575 if [[ ${#exepathlist[@]} == 0 ]]; then
7676 echo "[rosrun] Couldn't find executable named $2 below $pkgdir"
77 nonexepathlist=(`find -H "$pkgdir" -name "$2"`)
77 nonexepathlist=($(find -H "$pkgdir" -name "$2"))
7878 if [[ ${#nonexepathlist[@]} != 0 ]]; then
7979 echo "[rosrun] Found the following, but they're either not files,"
8080 echo "[rosrun] or not executable:"