aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Erdmann <dywi@mailerd.de>2014-12-16 01:42:40 +0100
committerAndré Erdmann <dywi@mailerd.de>2015-01-26 18:33:56 +0100
commit5a767d95450d48aed547234114c486142d97186b (patch)
treecc22c1d26e8e80d8fb7cc8ea1717d351fc890d58
parentroverlay/defaultscript: remove debug print() (diff)
downloadR_overlay-5a767d95450d48aed547234114c486142d97186b.tar.gz
R_overlay-5a767d95450d48aed547234114c486142d97186b.tar.bz2
R_overlay-5a767d95450d48aed547234114c486142d97186b.zip
doc/, hook env: document stdin==/dev/null
-rw-r--r--doc/html/usage.html38
-rw-r--r--doc/rst/usage.rst9
2 files changed, 38 insertions, 9 deletions
diff --git a/doc/html/usage.html b/doc/html/usage.html
index a8075cb..440896e 100644
--- a/doc/html/usage.html
+++ b/doc/html/usage.html
@@ -3,13 +3,13 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>Automatically Generated Overlay of R packages</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
-:Id: $Id: html4css1.css 7514 2012-09-14 14:27:12Z milde $
+:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
@@ -313,6 +313,21 @@ table.docutils th.field-name, table.docinfo th.docinfo-name {
white-space: nowrap ;
padding-left: 0 }
+/* "booktabs" style (no vertical lines) */
+table.docutils.booktabs {
+ border: 0px;
+ border-top: 2px solid;
+ border-bottom: 2px solid;
+ border-collapse: collapse;
+}
+table.docutils.booktabs * {
+ border: 0px;
+}
+table.docutils.booktabs th {
+ border-bottom: thin solid;
+ text-align: left;
+}
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
@@ -2740,7 +2755,10 @@ successful overlay creation, which can be used to perform additional actions
without touching <em>roverlay's</em> source code.</p>
<p>To realize this, <em>roverlay</em> determines whether a given event is permitted
(<a class="reference internal" href="#event-policy">event policy</a>) and, if so, creates a <a class="reference internal" href="#hook-environment">hook environment</a> and runs the
-script. Additionally, shell scripts can load <em>roverlay's</em> <em>$FUNCTIONS</em> file,
+script.
+As these scripts are supposed to be non-interactive,
+<em>stdin</em> gets redirected to <tt class="docutils literal">/dev/null</tt>, except for <em>user</em>-event hooks.
+Additionally, shell scripts can load <em>roverlay's</em> <em>$FUNCTIONS</em> file,
which provides extra functionality.</p>
<div class="note">
<p class="first admonition-title">Note</p>
@@ -2812,7 +2830,7 @@ template gives an idea of how to write them:</p>
</span>
<span class="comment"># the script must not exit if everything went well (return is ok)
-</span><span class="keyword">return </span>0
+</span><span class="keyword">return</span> 0
</pre>
</div>
</div>
@@ -3193,8 +3211,8 @@ They should, however, not execute any code directly.</p>
<pre class="code sh literal-block">
<span class="comment"># protect against repeated inclusion of this file
# (replace &lt;name&gt; with a unique identifier)
-</span><span class="keyword">if</span> <span class="operator">[</span> -z <span class="literal string double">&quot;${__HAVE_&lt;name&gt;__-}&quot;</span> <span class="operator">]</span>; <span class="keyword">then
-</span><span class="name builtin">readonly </span>__HAVE_&lt;name&gt;__<span class="operator">=</span>y
+</span><span class="keyword">if</span> <span class="operator">[</span> -z <span class="literal string double">&quot;${__HAVE_&lt;name&gt;__-}&quot;</span> <span class="operator">]</span><span class="punctuation">;</span> <span class="keyword">then</span>
+<span class="name builtin">readonly </span>__HAVE_&lt;name&gt;__<span class="operator">=</span>y
<span class="comment"># function file body
# ...
@@ -3229,7 +3247,11 @@ They should, however, not execute any code directly.</p>
</tr>
<tr><td>user</td>
<td>unchanged</td>
-<td>user-triggered event</td>
+<td><p class="first">user-triggered event</p>
+<p class="last">This is the only event for
+which stdin does not get
+redirected.</p>
+</td>
</tr>
</tbody>
</table>
@@ -5146,7 +5168,7 @@ becomes &quot;loop until resolver closes&quot;.</p>
</div>
<div class="footer">
<hr class="footer" />
-Generated on: 2014-08-23.
+Generated on: 2015-01-26.
</div>
</body>
diff --git a/doc/rst/usage.rst b/doc/rst/usage.rst
index c6046c0..78acdff 100644
--- a/doc/rst/usage.rst
+++ b/doc/rst/usage.rst
@@ -2360,7 +2360,10 @@ without touching *roverlay's* source code.
To realize this, *roverlay* determines whether a given event is permitted
(`event policy`_) and, if so, creates a `hook environment`_ and runs the
-script. Additionally, shell scripts can load *roverlay's* *$FUNCTIONS* file,
+script.
+As these scripts are supposed to be non-interactive,
+*stdin* gets redirected to ``/dev/null``, except for *user*-event hooks.
+Additionally, shell scripts can load *roverlay's* *$FUNCTIONS* file,
which provides extra functionality.
.. Note::
@@ -2772,6 +2775,10 @@ The following table lists all known events (``ROVERLAY_PHASE``):
| db_written | *$OVERLAY* | stats database file written |
+-------------------+---------------------------+------------------------------+
| user | unchanged | user-triggered event |
+ | | | |
+ | | | This is the only event for |
+ | | | which stdin does not get |
+ | | | redirected. |
+-------------------+---------------------------+------------------------------+