RethinkRobotics / baxter

Baxter Research Robot SDK
www.rethinkrobotics.com/sdk
BSD 3-Clause "New" or "Revised" License
71 stars 64 forks source link

tempfile not available on non-debian-based linux distributions #171

Closed alainsanguinetti closed 9 years ago

alainsanguinetti commented 9 years ago

Hi, I just tried to run the script on arch linux and it failed saying that tempfile is not available.

I found a working solution :

https://github.com/nilnor/howl/commit/93abf093af6fd0c4d5adfbdffe49ed64c3be36a2

if [ -z "$tmp" ]; then
    tmpdir=$TMPDIR
    if [ -z "$tmpdir" ]; then
        tmpdir=/tmp
    fi
    tmp=$tmpdir/howl_download$RANDOM.$$
fi
tf=$tmp 
rethink-imcmahon commented 9 years ago

Interesting! Thank you for reporting this issue along with your solution. I will test it out and merge into the Development branch :)

rethink-imcmahon commented 9 years ago

After talking with one of our Linux guru's, the command mktemp was suggested as an alternative to tempfile since it is part of the coreutils package. Does simply replacing tempfile with this work for you? Also, what Linux distro are you using, so I can replicate the issue?

alainsanguinetti commented 9 years ago

mktemp works very well for me, much more elegant solution than the above, thank you very much ! I am using arch linux.

rethink-imcmahon commented 9 years ago

Wonderful! I have added this fix into the release-1.1.1 patch. I'll create a pull request momentarily. Even though this is a simple change, I'd love for you to look it over and give a +1 @alainsanguinetti