ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans van der Meer <havdmeer@ziggo.nl>
To: NTG ConTeXt <ntg-context@ntg.nl>
Subject: mtxrun exit code
Date: Fri, 29 May 2020 11:20:22 +0200	[thread overview]
Message-ID: <C7C397A4-486E-4007-8E5E-92AD1952AC2A@ziggo.nl> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 788 bytes --]

I am producing a series of files in a shell script with mtxrun --autogenerate --script context input
Doing exit mtxrun... shows there is no exit number to test in the shell, or to ste a shell variable to that value.

I can set a global macro \ExitStatus to an exit value depending on success or failure, pass that on to mtxrun as exit statusd and test that in the script.

For example:
\starttext
  \xmlprocessbuffer{notes}{notes}{}
  \doif{\ExitStatus}{notok}{"let mtxrun return value 1 as error in UNIX"}
\stoptext

After that it would be possible in the shell script to delete the pdf produced, what is my intention in this case.

Is this an option or is there presently another (standard) procedure to communicate from ConTeXt to the shell.

dr. Hans van der Meer



[-- Attachment #1.2: Type: text/html, Size: 2468 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

             reply	other threads:[~2020-05-29  9:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  9:20 Hans van der Meer [this message]
2020-05-29  9:35 ` Marco Patzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C7C397A4-486E-4007-8E5E-92AD1952AC2A@ziggo.nl \
    --to=havdmeer@ziggo.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).