summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/iexec/iexec.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/iexec/iexec.sty')
-rw-r--r--macros/latex/contrib/iexec/iexec.sty22
1 files changed, 12 insertions, 10 deletions
diff --git a/macros/latex/contrib/iexec/iexec.sty b/macros/latex/contrib/iexec/iexec.sty
index a84c53e458..91d10955c3 100644
--- a/macros/latex/contrib/iexec/iexec.sty
+++ b/macros/latex/contrib/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