diff options
author | Karl Berry <karl@freefriends.org> | 2021-07-10 21:04:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-07-10 21:04:20 +0000 |
commit | 722320dd2cb1cb8e3aadc79b015ad958304ff9fd (patch) | |
tree | 097d6cb2f4e86e5dc2eb1b2b9fd7c95b5934b081 /Master/texmf-dist/tex/latex/iexec/iexec.sty | |
parent | 3d27c90380ff5a36495684726a02e13a00ab5fe5 (diff) |
iexec (10jul21)
git-svn-id: svn://tug.org/texlive/trunk@59891 c570f23f-e606-0410-a88d-b1316a301751
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 |