texlive[64675] Master/texmf-dist: iexec (10oct22)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 10 22:23:09 CEST 2022


Revision: 64675
          http://tug.org/svn/texlive?view=revision&revision=64675
Author:   karl
Date:     2022-10-10 22:23:09 +0200 (Mon, 10 Oct 2022)
Log Message:
-----------
iexec (10oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/iexec/iexec.pdf
    trunk/Master/texmf-dist/source/latex/iexec/iexec.dtx
    trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty

Modified: trunk/Master/texmf-dist/doc/latex/iexec/iexec.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/iexec/iexec.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/iexec/iexec.dtx	2022-10-10 20:22:56 UTC (rev 64674)
+++ trunk/Master/texmf-dist/source/latex/iexec/iexec.dtx	2022-10-10 20:23:09 UTC (rev 64675)
@@ -50,7 +50,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{iexec}
 %<*package>
-[09.10.20220 0.7.0 Inputable Shell Executions]
+[2022-10-10 0.8.1 Inputable Shell Executions]
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
@@ -210,7 +210,6 @@
 \usepackage{iexec}
 \begin{document}
 \iexec[log]{echo 'Hello, \\LaTeX!'}
-\input{foo.txt}
 \end{document}
 \end{verbatim}
 %\iffalse
@@ -218,6 +217,23 @@
 %\fi
 % \end{macro}
 
+% \begin{macro}{null}
+% The stdout of the command will be sent to |/dev/null|:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\documentclass{article}
+\usepackage{iexec}
+\begin{document}
+\iexec[null]{rm some-file.txt}
+\end{document}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+% \end{macro}
+
 % \StopEventually{}
 
 % \section{Implementation}
@@ -226,6 +242,8 @@
 % \changes{v0.4.0}{2021/08/01}{Runtime verification for --shell-escape option}
 % \changes{v0.4.1}{2021/08/08}{Options trace, stdout, and quiet added}
 % \changes{v0.5.0}{2022/01/08}{Major bug fixes}
+% \changes{v0.6.0}{2022/10/09}{Additional options 'log' and 'append'}
+% \changes{v0.7.0}{2022/10/10}{Additional option 'null'}
 
 % First, we include a few packages:
 %    \begin{macrocode}
@@ -248,6 +266,7 @@
   trace/.estore in = \iexec at traceit,
   append/.estore in = \iexec at append,
   log/.estore in = \iexec at log,
+  null/.estore in = \iexec at null,
   quiet/.estore in = \iexec at quiet,
   stdout
 }\makeatother
@@ -300,23 +319,25 @@
 %    \end{macrocode}
 % Then, we execute it:
 %    \begin{macrocode}
-      \ShellEscape{#2 \ifdefined\iexec at append>\fi> \iexec at stdout}%
+      \ShellEscape{#2 \ifdefined\iexec at append>\fi>\ifdefined\iexec at null/dev/null\else\iexec at stdout\fi}%
 %    \end{macrocode}
 % Then, a message is printed to TeX log:
 %    \begin{macrocode}
-      \message{^^Jiexec: [#2 > \iexec at stdout]^^J}%
+      \message{^^Jiexec: [#2 \ifdefined\iexec at append>\fi>\ifdefined\iexec at null/dev/null\else\iexec at stdout\fi]^^J}%
     \endgroup%
 %    \end{macrocode}
 % Then, if required, the content of the stdout file will be printed to the log:
 %    \begin{macrocode}
+    \ifdefined\iexec at null\else
     \ifdefined\iexec at log
       \message{^^Jiexec: this is the content of \iexec at stdout:^^J}%
       \iexec at typeout{\iexec at stdout}
       \message{^^J<EOF>^^J}%
-    \fi%
+    \fi\fi%
 %    \end{macrocode}
 % Then, include the produced output into the current document:
 %    \begin{macrocode}
+    \ifdefined\iexec at null\else
     \ifdefined\iexec at quiet
       \message{^^Jiexec: Due to 'quiet' option we didn't read
       the content of '\iexec at stdout' (\pdffilesize{} bytes)^^J}%
@@ -326,10 +347,11 @@
       \input{\iexec at stdout}%
       \message{^^Jiexec: The content of '\iexec at stdout'
       was included into the document^^J}%
-    \fi%
+    \fi\fi%
 %    \end{macrocode}
 % Finally, delete the file or leave it untouched:
 %    \begin{macrocode}
+    \ifdefined\iexec at null\else
     \ifiexec at trace%
       \message{^^Jiexec: Due to package option 'trace',
       the file '\iexec at stdout' was not deleted^^J}%
@@ -341,7 +363,7 @@
         \ShellEscape{rm \iexec at stdout}%
         \message{^^Jiexec: The file '\iexec at stdout' was deleted^^J}%
       \fi%
-    \fi%
+    \fi\fi%
   \endgroup
 }\makeatother
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty	2022-10-10 20:22:56 UTC (rev 64674)
+++ trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty	2022-10-10 20:23:09 UTC (rev 64675)
@@ -31,7 +31,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{iexec}
-[09.10.20220 0.7.0 Inputable Shell Executions]
+[2022-10-10 0.8.1 Inputable Shell Executions]
 
 
 
@@ -45,6 +45,7 @@
 
 
 
+
 \RequirePackage{shellesc}
 \RequirePackage{pgfkeys}
 \RequirePackage{expl3}
@@ -61,6 +62,7 @@
   trace/.estore in = \iexec at traceit,
   append/.estore in = \iexec at append,
   log/.estore in = \iexec at log,
+  null/.estore in = \iexec at null,
   quiet/.estore in = \iexec at quiet,
   stdout
 }\makeatother
@@ -90,14 +92,16 @@
       \let\\\@backslashchar%
       \let\{\@charlb%
       \let\}\@charrb%
-      \ShellEscape{#2 \ifdefined\iexec at append>\fi> \iexec at stdout}%
-      \message{^^Jiexec: [#2 > \iexec at stdout]^^J}%
+      \ShellEscape{#2 \ifdefined\iexec at append>\fi>\ifdefined\iexec at null/dev/null\else\iexec at stdout\fi}%
+      \message{^^Jiexec: [#2 \ifdefined\iexec at append>\fi>\ifdefined\iexec at null/dev/null\else\iexec at stdout\fi]^^J}%
     \endgroup%
+    \ifdefined\iexec at null\else
     \ifdefined\iexec at log
       \message{^^Jiexec: this is the content of \iexec at stdout:^^J}%
       \iexec at typeout{\iexec at stdout}
       \message{^^J<EOF>^^J}%
-    \fi%
+    \fi\fi%
+    \ifdefined\iexec at null\else
     \ifdefined\iexec at quiet
       \message{^^Jiexec: Due to 'quiet' option we didn't read
       the content of '\iexec at stdout' (\pdffilesize{} bytes)^^J}%
@@ -107,7 +111,8 @@
       \input{\iexec at stdout}%
       \message{^^Jiexec: The content of '\iexec at stdout'
       was included into the document^^J}%
-    \fi%
+    \fi\fi%
+    \ifdefined\iexec at null\else
     \ifiexec at trace%
       \message{^^Jiexec: Due to package option 'trace',
       the file '\iexec at stdout' was not deleted^^J}%
@@ -119,7 +124,7 @@
         \ShellEscape{rm \iexec at stdout}%
         \message{^^Jiexec: The file '\iexec at stdout' was deleted^^J}%
       \fi%
-    \fi%
+    \fi\fi%
   \endgroup
 }\makeatother
 



More information about the tex-live-commits mailing list.