[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#249597: texmf: Leaves spurious tempfiles around



On Fri, May 21, 2004 at 09:59:14AM +0200, Frank K?ster wrote:
> Hilmar Preusse <hille42@web.de> wrote:
> 
> > I don't think that is a bug. We should downgrade to wishlist. However
> > it should be simple to replace
> >
> >   fmtutil --all >> $TEMPFILE
> > by
> >   fmtutil --all >> $TEMPFILE && rm $TEMPFILE
> >
> > and
> >
> >   /usr/bin/updmap --outputdir /etc/texmf/dvips 2> ${MAPTEMP}
> > by
> >   /usr/bin/updmap --outputdir /etc/texmf/dvips 2> ${MAPTEMP} && rm ${MAPTEMP}
> >
> > works for me.
> 
> Two problems:
> 
> - if it turns out later that something went wrong, the file is lost. Not
>   a big issue, since /var/lib/texmf/web2c/*.log is still there.
> 
> - What should we do with the "Output of ... is in $TEMPFILE" message? We
>   would have to define a trap and redefine it before the second call. (or
>   use the same tempfile. That's probably better.)

Why not use something like this:

echo "Running initex..."
TMPFILE=`mktemp /tmp/tetex-bin.postinst.initex.XXXX` || exit 1
if initex > $TMPFILE; then
	rm -f $TMPFILE
else
	echo "initex exited with code $?... output stored in $TMPFILE"
	? exit 1 ?
fi

--Jeroen

-- 
Jeroen van Wolffelaar
Jeroen@wolffelaar.nl (also for Jabber & MSN; ICQ: 33944357)
http://Jeroen.A-Eskwadraat.nl



Reply to: