<div id="loginfo-example"></div>
<div class="header">
<p>
Next: [[cvs: Keeping a checked out copy#Keeping a checked out copy|Keeping a checked out copy]], Up: [[cvs: Loginfo#Loginfo|loginfo]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Loginfo-example"></div>
===== Loginfo example =====

The following &lsquo;<tt>loginfo</tt>&rsquo; file, together with the
tiny shell-script below, appends all log messages
to the file &lsquo;<tt>$CVSROOT/CVSROOT/commitlog</tt>&rsquo;,
and any commits to the administrative files (inside
the &lsquo;<tt>CVSROOT</tt>&rsquo; directory) are also logged in
&lsquo;<tt>/usr/adm/cvsroot-log</tt>&rsquo;.
Commits to the &lsquo;<tt>prog1</tt>&rsquo; directory are mailed to <tt>ceder</tt>.

<div class="example" style="margin-left: 3.2em">
 ALL             /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER
 ^CVSROOT        /usr/local/bin/cvs-log /usr/adm/cvsroot-log
 ^prog1          Mail -s %s ceder
</div>

The shell-script &lsquo;<tt>/usr/local/bin/cvs-log</tt>&rsquo; looks
like this:

<div class="example" style="margin-left: 3.2em">
 #!/bin/sh
 (echo &quot;------------------------------------------------------&quot;;
  echo -n $2&quot;  &quot;;
  date;
  echo;
  cat) &gt;&gt; $1
</div>

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
