ros/catkin — pull request #251 by tkruse (2012-11-07 12:29:14+00:00)
Title: Robust setup sh

this makes setup.sh behave better when _Setup_util.py is missing, which can happen due to bugs or because the user modified the filename.

Also second commit uses the same var to invoke util script, which makes the expanded setup.sh more readable IMO.

To make it even more robust, it would be best to check each invocation of it for valid return value before using the output. E.g. instead of:

export CPATH="$("$SETUP_UTIL" --prefix --name CPATH --value "@SETUP_DIR$CPATH_dir")$CPATH"

use:

CPATH_new="$("$SETUP_UTIL" --prefix --name CPATH --value "@SETUP_DIR$CPATH_dir")$CPATH"
if [ ! "$foo" = "" ]; then
export CPATH=...
fi

Will create patch for that if you say so.