Use of mktemp on OSX and BSD

Aurélien Naldi <aurelien.naldi at gmail.com>
Mon Jul 29 05:07:27 EDT 2013

Hi,

we are running yelp-build on linux and OSX and we had one small problem on
OSX: the mktemp command there behaves differently as the GNU version: it
requires the "template" argument instead of having a default one. Except
for this, the yelp tools work fine in our use case on OSX.
We also use a trick based on "dirname $0" to detect the install folder
instead of hardcoding it upon "build".

I suppose that this is a problem on BSD as well, and we would love to this
see it fixed upstream instead of making this (small) change ourselves.

A quick fix is really easy: replace "mktemp" with "mktemp /tmp/yelp-XXXXXX"
Unfortunately you may want something more subtle to handle systems with
$TMPDIR in a different place, thus I'm not sure what a perfect solution is.
Maybe detect OSX/BSD and only add the template on these systems or check
$TMPDIR when creating the template.


Best.

-- 
Aurélien Naldi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projectmallard.org/pipermail/mallard-list/attachments/20130729/93dccd10/attachment.html>