summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/iexec/iexec.pdfbin326148 -> 327771 bytes
-rw-r--r--Master/texmf-dist/source/latex/iexec/iexec.dtx26
-rw-r--r--Master/texmf-dist/tex/latex/iexec/iexec.sty4
3 files changed, 19 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/iexec/iexec.pdf b/Master/texmf-dist/doc/latex/iexec/iexec.pdf
index e4633ab765a..c3d51f4982b 100644
--- a/Master/texmf-dist/doc/latex/iexec/iexec.pdf
+++ b/Master/texmf-dist/doc/latex/iexec/iexec.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/iexec/iexec.dtx b/Master/texmf-dist/source/latex/iexec/iexec.dtx
index 30f44bdbf9a..94b924652a8 100644
--- a/Master/texmf-dist/source/latex/iexec/iexec.dtx
+++ b/Master/texmf-dist/source/latex/iexec/iexec.dtx
@@ -50,12 +50,13 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{iexec}
%<*package>
-[2022-10-22 0.11.0 Inputable Shell Executions]
+[2022-10-23 0.11.1 Inputable Shell Executions]
%</package>
%<*driver>
\documentclass{ltxdoc}
\usepackage[tt=false, type1=true]{libertine}
\usepackage{microtype}
+\usepackage{xcolor}
\usepackage[dtx]{docshots}
\usepackage{iexec}
\usepackage{href-ul}
@@ -77,6 +78,9 @@
%
% \maketitle
%
+% \textbf{\color{red}NB!}
+% This package doesn't work on Windows!
+%
% \section{Introduction}
%
% This package helps you execute shell commands right from the
@@ -324,7 +328,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\fi%
\begingroup%
% \end{macrocode}
-% Then, start the log from a clean line:
+% Then, we start the log from a clean line:
% \begin{macrocode}
\ifdefined\iexec@log%
\message{^^J}%
@@ -339,27 +343,28 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\let\{\@charlb%
\let\}\@charrb%
% \end{macrocode}
-% Then, we execute it:
+% Then, we execute it and save exit code into a file (where we also add \% in order to trim the content to exactly one number, as suggested \href{https://tex.stackexchange.com/questions/662756}{here}):
% \changes{0.10.0}{2022/10/19}{The ability to track exit code was added. Now, the code is saved into "iexec.ret" file, which is then read and checked for zero value.}
% \changes{0.8.0}{2022/10/05}{The option "null" was introduced, allowing redirection of stdout to "/dev/null". Doesn't work on Windows, though.}
% \changes{0.9.0}{2022/10/15}{The option "stderr" was introduced, allowing redirection of stderr to a file. Without this option specified, stderr will go to stdout.}
% \changes{0.11.0}{2022/10/22}{The file with exit code now contains just numbers, without end of line.}
+% \changes{0.11.1}{2022/10/23}{When exit code is printed to the file, we add percentchar at the end of line in order to avoid extra space when reading it back.}
% \begin{macrocode}
\def\iexec@cmd{(#2)
\ifdefined\iexec@append>\fi>
\ifdefined\iexec@null/dev/null\else\iexec@stdout\fi
\space\ifdefined\iexec@stderr2>\iexec@stderr\else2>&1\fi;
- /bin/echo -n $? >\iexec@exit}
+ /bin/echo -n $?\% >\iexec@exit}
\ShellEscape{\iexec@cmd}%
% \end{macrocode}
-% Then, a message is printed to TeX log:
+% Then, a message is printed to \TeX{} log:
% \begin{macrocode}
\ifdefined\iexec@log%
\message{iexec: [\iexec@cmd]^^J}%
\fi%
\endgroup%
% \end{macrocode}
-% Then, if required, the content of the stdout file will be printed to the log:
+% Then, if required, we print the content of the stdout file to \TeX{} log:
% \begin{macrocode}
\ifdefined\iexec@null\else%
\ifdefined\iexec@log%
@@ -368,11 +373,14 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\message{<EOF>^^J}%
\fi\fi%
% \end{macrocode}
-% Then, we check exit code, unless there is |ignore| option:
+% Then, we read back the exit code, from the file:
% \begin{macrocode}
\immediate\openin\iexec@exitfile=\iexec@exit%
\read\iexec@exitfile to \iexec@code%
\immediate\closein\iexec@exitfile%
+% \end{macrocode}
+% Then, we check whether it's zero or not (if not zero, we either print a message or fail the build, depending on the presence of |ignore| option):
+% \begin{macrocode}
\ifnum\iexec@code=0\else%
\ifdefined\iexec@ignore%
\ifdefined\iexec@log%
@@ -385,7 +393,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
\fi%
\fi%
% \end{macrocode}
-% Then, include the produced output into the current document:
+% Then, we include the produced output into the current document:
% \begin{macrocode}
\ifdefined\iexec@null\else%
\ifdefined\iexec@quiet%
@@ -406,7 +414,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
was included into the document^^J}%
\fi\fi%
% \end{macrocode}
-% Finally, delete the file or leave it untouched:
+% Finally, we delete the file or leave it untouched:
% \begin{macrocode}
\ifdefined\iexec@null\else%
\ifiexec@trace%
diff --git a/Master/texmf-dist/tex/latex/iexec/iexec.sty b/Master/texmf-dist/tex/latex/iexec/iexec.sty
index a4eb81f9966..5ce5a76a160 100644
--- a/Master/texmf-dist/tex/latex/iexec/iexec.sty
+++ b/Master/texmf-dist/tex/latex/iexec/iexec.sty
@@ -31,7 +31,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{iexec}
-[2022-10-22 0.11.0 Inputable Shell Executions]
+[2022-10-23 0.11.1 Inputable Shell Executions]
@@ -110,7 +110,7 @@
\ifdefined\iexec@append>\fi>
\ifdefined\iexec@null/dev/null\else\iexec@stdout\fi
\space\ifdefined\iexec@stderr2>\iexec@stderr\else2>&1\fi;
- /bin/echo -n $? >\iexec@exit}
+ /bin/echo -n $?\% >\iexec@exit}
\ShellEscape{\iexec@cmd}%
\ifdefined\iexec@log%
\message{iexec: [\iexec@cmd]^^J}%