setup.sh uses rm without -f: errors on login/new shell
Hi!
I have defined: alias rm='rm -i' to prevent myself from desasters.
Unfortunately ROS setup.sh uses rm in a way, that I get asked to remove the file /tmp/setup.sh.XXXXX while logging in or starting a new bash (both source setup.sh).
Well, here is a patch, that adds a check and some quotes, too:
$ diff /opt/ros/groovy/setup.sh.orig /opt/ros/groovy/setup.sh
37,41c37,45
< MKTEMP=`which mktemp`
< SETUP_TMP=`$MKTEMP /tmp/setup.sh.XXXXXXXXXX`
< $SETUP_UTIL $@ > $SETUP_TMP
< . $SETUP_TMP
< rm $SETUP_TMP
---
> MKTEMP="`which mktemp`"
> SETUP_TMP="`$MKTEMP /tmp/setup.sh.XXXXXXXXXX`"
> if [ $? -ne 0 ] ; then
> echo "ROS config error: creating tmp file for setup failed" >> "/dev/stderr"
> else
> $SETUP_UTIL $@ > "$SETUP_TMP"
> . "$SETUP_TMP"
> rm -f "$SETUP_TMP"
> fi
might be worth a patch, but unfortunately I was not able to create an account on the bugtracker.