summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-02-12 15:10:40 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-02-12 15:10:40 +0000
commit3d9f4c786ee1bce0ded8871f405b11e7eb62df13 (patch)
treecd14d8f88b78024485f5037b84c19b992faf0455 /doc
parent2672d89224931b8c3b9b7bf9c67fcfd962d74cbd (diff)
downloadexecline-3d9f4c786ee1bce0ded8871f405b11e7eb62df13.tar.xz
Add envfile; prepare for 2.5.1.0
Diffstat (limited to 'doc')
-rw-r--r--doc/envfile.html95
-rw-r--r--doc/index.html5
-rw-r--r--doc/upgrade.html7
3 files changed, 105 insertions, 2 deletions
diff --git a/doc/envfile.html b/doc/envfile.html
new file mode 100644
index 0000000..49b88f9
--- /dev/null
+++ b/doc/envfile.html
@@ -0,0 +1,95 @@
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>execline: the envfile program</title>
+ <meta name="Description" content="execline: the envfile program" />
+ <meta name="Keywords" content="execline command envfile environment file shell envdir s6-envdir env" />
+ <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">execline</a><br />
+<a href="//skarnet.org/software/">Software</a><br />
+<a href="//skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The <tt>envfile</tt> program </h1>
+
+<p>
+<tt>envfile</tt> reads a file containing variable assignments,
+adds the variables to the environment, then executes a program.
+</p>
+
+<h2> Interface </h2>
+
+<pre>
+ envfile <em>file</em> <em>prog...</em>
+</pre>
+
+<p>
+<tt>envfile</tt> reads <em>file</em> and adds the key-value pairs
+defined in <em>file</em> to the environment. Then it
+execs into <em>prog...</em>, i.e. the rest of its command line,
+with the modified environment.
+</p>
+
+<h2> Exit codes </h2>
+
+<ul>
+ <li> 1:&nbsp;syntax error in <em>file</em> </li>
+ <li> 100:&nbsp;wrong usage </li>
+ <li> 111:&nbsp;system call failed </li>
+ <li> 126:&nbsp;execve() on <em>prog</em> failed (unknown reason) </li>
+ <li> 127:&nbsp;execve() on <em>prog</em> failed (<em>prog</em> could not be found) </li>
+</ul>
+
+<p>
+ 0 is not listed because on success, <tt>envfile</tt> does not exit:
+it execs into <em>prog</em>.
+</p>
+
+<h2> File syntax </h2>
+
+<p>
+ <em>file</em> is a text file containing lines of the form <tt>key = value</tt>.
+Whitespace is permitted before and after <em>key</em>, and before or after <em>value</em>,
+but <em>key</em> or <em>value</em> can never contain whitespace. No quoting
+is possible.
+</p>
+
+<p>
+ Empty lines, or lines containing only whitespace, are ignored.
+Lines beginning with <tt>#</tt> (possibly after some whitespace)
+are ignored (and typically used for comments).
+Comments are also possible at the end of lines:
+<tt>key = value # comment</tt> is a valid line. Note that there
+<em>must</em> be whitespace between <em>value</em> and <tt>#</tt>
+in this case (else <tt>#</tt> is just read as a part of <em>value</em>).
+</p>
+
+<p>
+ If <em>value</em> is empty, <em>key</em> is <strong>still</strong>
+added to the environment, with an empty value. If you do not want
+<em>key</em> to be added to the environment at all, comment out the line.
+<tt>envfile</tt> does not offer a way to <em>remove</em> variables from
+the environment.
+</p>
+
+<h2> Notes </h2>
+
+<ul>
+ <li> If <em>file</em> is <tt>-</tt> then <tt>envfile</tt> reads
+and parses its standard input instead. To read a file literally named
+<tt>-</tt>, you can use <tt>./-</tt> for instance. </li>
+ <li> <tt>The variables and values that can be defined with <tt>envfile</tt>
+are purposefully restricted in order to keep the parsing extremely simple.
+If you need fancy values, for instance values that contain whitespace or
+a newline, you should use an envdir instead: see
+<a href="//skarnet.org/software/s6/s6-envdir.html">s6-envdir</a>. </li>
+</ul>
+
+</body>
+</html>
diff --git a/doc/index.html b/doc/index.html
index 9a68d5f..3efad3a 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -51,7 +51,7 @@ shell's syntax, and has no security issues.
<li> A POSIX-compliant system with a standard C development environment </li>
<li> GNU make, version 3.81 or later. </li>
<li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version
-2.7.0.0 or later. It's a build-time requirement. It's also a run-time
+2.8.0.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs
library. </li>
</ul>
@@ -66,7 +66,7 @@ library. </li>
<h3> Download </h3>
<ul>
- <li> The current released version of execline is <a href="execline-2.5.0.1.tar.gz">2.5.0.1</a>. </li>
+ <li> The current released version of execline is <a href="execline-2.5.1.0.tar.gz">2.5.1.0</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="//git.skarnet.org/cgi-bin/cgit.cgi/execline/">execline
git repository</a>:
@@ -128,6 +128,7 @@ to your installation: the shebang lines for your system might be something like
<li><a href="cd.html">The <tt>cd</tt> program</a></li>
<li><a href="umask.html">The <tt>umask</tt> program</a></li>
<li><a href="emptyenv.html">The <tt>emptyenv</tt> program</a></li>
+<li><a href="envfile.html">The <tt>envfile</tt> program</a></li>
<li><a href="export.html">The <tt>export</tt> program</a></li>
<li><a href="unexport.html">The <tt>unexport</tt> program</a></li>
<li><a href="fdclose.html">The <tt>fdclose</tt> program</a></li>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 5eed0d8..80c5dea 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,13 @@
<h1> What has changed in execline </h1>
+<h2> in 2.5.1.0 </h2>
+
+<ul>
+ <li> skalibs dependency bumped to 2.8.0.0 </li>
+ <li> New command: <a href="envfile.html">envfile</a>. </li>
+</ul>
+
<h2> in 2.5.0.1 </h2>
<ul>