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

Re: Font packages for TeX



Ralf Stubner <ralf.stubner@physik.uni-erlangen.de> wrote:

> mktexlsr [<TEXMFSYSVAR> <TEXMFMAIN>] || true
> updmap-sys || true
>
> or
>
> if which mktexlsr >/dev/null 2>&1  && which updmap-sds >/dev/null 2>&1; then
>    mktexlsr [<TEXMFSYSVAR> <TEXMFMAIN>]
>    updmap-sys
> else
>    echo "No TeX-System present."
> fi
>
> I am not sure about the relative merits of the two approaches.

IMHO, the first one means "run these programs, and pretend everything is
OK regardless of the outcome" while the second one means "if the
programs are available, they should run properly; if they are available
and fail, there is a problem that should be dealt with."

I really prefer the second approach for postinst. Note that the '2>&1'
is not necessary (and probably better left out, in order not to miss
really important error messages [I/O error, whatever]) with the 'which'
program that should be invoked by /bin/sh scripts with a standard PATH
(i.e., the one provided by debianutils).

-- 
Florent



Reply to: