Hi Pablo,

Your script doesn't have texroot set.

You either need to source ~/.profile (or whatever sets texroot) or explicitly set it.

At the top of my compile script, I've got:

TEXROOT=/opt/context/tex/
TEXMFOS=$TEXROOT/texmf-linux-64
export PATH=$TEXMFOS/bin:$PATH

I think the fact that you're sourcing setuptex but passing in $1 as a file path is problematic, since setuptex eats $1 as the texroot.


On 8 June 2017 at 14:05, Pablo Rodriguez <oinos@gmx.es> wrote:
On 06/07/2017 11:01 PM, Hans Hagen wrote:
> sure it's no big deal to write such a script but in decades of tex i
> never felt the need

I wrote a small script for my Linux machine (check-context.sh), to be
able to check a single file:

  source $HOME/ctxbeta/tex/setuptex
  mtxrunjit --autogenerate --script check $1
  echo $1

But when applied to a file, I get the following:

  $ check-context untitled.tex
  The argument "/home/ousia/untitled.tex" is not a valid TEXROOT path.
  (There is no file "/home/ousia/untitled.tex/texmf/tex/plain
  /base/plain.tex")
      8  grouping error  ode[abc] <lf>     This is \linenote{abed
   intended. <lf>      <lf>     \stopt
   10  missing stop  enote{abed intended. <lf>      <lf>     \stoptext
   <lf>  (see line 7)

  untitled.tex

I mean, I get the output, but after an error. $1 has full path in the
first ocurrence, but it has only the relative path with echo.

Of course, I get not error by direct invocation:

  $ mtxrunjit --autogenerate --script check untitled.tex
      8  grouping error  ode[abc] <lf>     This is \linenote{abed
   intended. <lf>      <lf>     \stopt
   10  missing stop  enote{abed intended. <lf>      <lf>     \stoptext
  <lf>  (see line 7)

What am I doing wrong here?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________



--

Brian Ballsun-Stanton Ph.D.
FAIMS Project - Data Architect 
brian@fedarch.org 0479 178 749