summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/iexec/iexec.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-11 03:01:09 +0000
committerNorbert Preining <norbert@preining.info>2021-07-11 03:01:09 +0000
commite8fe5891061b5c99a322e9d1b364f92c1016b3d5 (patch)
tree8d2b4d565db662420b4d02d6e882bb8471f4a96f /macros/latex/contrib/iexec/iexec.sty
parenta429edf534c5a39d3dc3112b4ef98d0c2cfb9e76 (diff)
CTAN sync 202107110301
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