On 2017-05-01 14:33:56, Axel Beckert wrote:
> Hi Paul,
>
> thanks for the bug report.
>
> Paul Wise wrote:
>> It appears that this is the right way to create directories:
>> 
>> mktemp -d -t dman.XXXXXX
>
> Nope. The mktemp man page says about "-t": "interpret TEMPLATE as a
> single file name component, relative to a directory: $TMPDIR".
>
> So I'll likely go with "-p" instead: "interpret TEMPLATE relative to
> DIR; if DIR is not specified, use $TMPDIR if set, else /tmp. With this
> option, TEMPLATE must not be an absolute name; unlike with -t,
> TEMPLATE may contain slashes, but mktemp creates only the final
> component"

Quite frankly, at this point, I'm getting dangerously close to my "100
lines maximum for shell scripts" rule (86 lines). With Ubuntu support
coming, I really wonder if we shouldn't rewrite this in a proper
language (e.g. python or go) that doesn't have those kind of
idiosyncracies:

https://github.com/Debian/debiman/issues/57#issuecomment-298235767

When we get to string interpolation through eval is pretty much where I
give up on shell anyways. ;)

That said, the agreement we had was to patch man.c instead of doing
this, originally, so maybe it's a bad idea to do a rewrite at this
stage...

a.

-- 
Uncompromising war resistance and refusal to do military service under
any circumstances.
                       - Albert Einstein

Reply via email to