Hi all!

On Die, 24 Okt 2006, Norbert Preining wrote:
> >   # texexec --make --all [--xetex | --aleph | --pdftex] <formats>
> > 
> > Where <formats> are the desired formats to run. The accepted list
> > at the moment is: the eight ConTeXt formats, in both long
> > ("cont-en" etc.) and  short from ("en","nl","de","it","fr","cz",
> > "ro","uk"), and "mptopdf", and the metapost mems "mpost" and "metafun".

Ok, I have rewritten the Debian context package so that it does the
following:

On installation/update time a script context-build-formats is called
which reads the file
        /etc/texmf/context/formats.cnf
where all the formats to be build are defined. Currently my file looks
like this:
#
# This file defines which ConTeXt formats are build
#
{pdftex,aleph} {de,en,it,mptopdf}

Yes, it expands the curly braces.

On removal currently I don't do anything, because I don't know how to
know which files should be removed. But this shouldn't be to hard,
remove /usr/share/texmf/web2c/$engine/$format.*

Anyway, it is not very intellignet the script, no error checking,
nothing, but it runs.

What do you say:
- you ConTeXt people: concerning the format file, the way of updating?
- you Debian people: concerning the new way to define it?


The context-build-formats should be something like fmtutil(-sys) for
context. I didn't come around to implement the difference between the
-sys and the normal variant, but it should be easy, as in fmtutil-sys.

Any suggestions?

BTW, here is the code for the script, it is short:
#!/bin/bash
# context-build-formats
export TEXMFSYSCONFIG=/usr/share/texmf

parse_line()
{
  engine=$1
  format=$2
  eval set $engine
  allengines="$@"
  eval set $format
  allformats="$@"
  for e in $allengines ; do
    for f in $allformats ; do
      texexec --make --$e $f
    done
  done
}

OIFS=$IFS
IFS='
'
set $(echo x; sed '/^#/d; /^[  ]*$/d' "/etc/texmf/context/formats.cnf")
; shift
IFS=$OIFS
for line 
do
  parse_line $line;
done
# eof

You see where I robbed the code ... fmtutil.


Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[EMAIL PROTECTED]>                    Università di Siena
Debian Developer <[EMAIL PROTECTED]>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SKETTY (n.)
Apparently self-propelled little dance a beer glass performs in its
own puddle.
                        --- Douglas Adams, The Meaning of Liff
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to