diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/iexec/iexec.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/iexec/iexec.sty | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/latex/iexec/iexec.sty b/Master/texmf-dist/tex/latex/iexec/iexec.sty index a84c53e458b..91d10955c3a 100644 --- a/Master/texmf-dist/tex/latex/iexec/iexec.sty +++ b/Master/texmf-dist/tex/latex/iexec/iexec.sty @@ -21,22 +21,24 @@ % SOFTWARE. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{iexec}[2021/07/08 0.1.0 Inputable Shell Executions] +\ProvidesPackage{iexec}[2021/07/10 0.3.0 Inputable Shell Executions] -\makeatletter\newcommand\exec[1]{% +\RequirePackage{shellesc} + +\RequirePackage{xkeyval} +\newif\iftrace +\DeclareOptionX{trace}{\tracetrue} +\ProcessOptionsX\relax + +\makeatletter\newcommand\iexec[2][iexec.tmp]{% \begingroup% \let\%\@percentchar% \let\{\@charlb% \let\}\@charrb% - \ShellEscape{#1}% + \ShellEscape{#2 > #1}% \endgroup% -}\makeatother - -\newcommand\iexec[1]{% - \exec{#1 > iexec.tmp}% - \exec{echo >> iexec.tmp}% - \input{iexec.tmp}\unskip% - \exec{rm iexec.tmp}% + \input{#1}\unskip% + \iftrace\else\exec{rm #1}\fi% }\makeatother \endinput |