Bug#240231: mktexmf creates tempfiles in working dir (was: Bug#240231: tetex-bin: mktextfm fails to create font)
> mktexmf does the following - I copy only the important lines:
> cat > "mf$$.tmp" <<END
> design_size := $realsize;
> input $rootname;
This is done inside a new temporary directory. From texmf/web2c/mktex.opt:
if test -n "$TMPDIR"; then
(umask 077 && mkdir "$TEMPDIR") || exit 1
cd "$TEMPDIR" || exit 1
> obviously not always. It would be better to create the temporary file in
> /tmp (or $TMPDIR if set).
This already happens. I just have done:
chmod 555 /tmp/foo
and it worked.
> Probably some checks should be done - or at least the script should be
> "set -e".
Special things have to be done to make scripts "set -e" safe... I prefer
to check important return values individually which gives more control
and avoids things like
# see if foo exists
ret=`kpsewhich foo || true`
which are quite ugly.