diff options
Diffstat (limited to 'README.html')
-rw-r--r-- | README.html | 246 |
1 files changed, 164 insertions, 82 deletions
diff --git a/README.html b/README.html index 286583d..6c38c37 100644 --- a/README.html +++ b/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> -<!-- 2018-11-19 Mon 01:39 --> +<!-- 2018-11-20 Tue 13:48 --> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>‎</title> @@ -232,36 +232,36 @@ for the JavaScript code in this tag. <h2>Table of Contents</h2> <div id="text-table-of-contents"> <ul> -<li><a href="#org501dc95">ck</a> +<li><a href="#org10db10e">ck</a> <ul> -<li><a href="#org34cb767">Technicalities</a></li> -<li><a href="#org090a724">Download</a></li> +<li><a href="#orgd5becfe">Technicalities</a></li> +<li><a href="#org9006d02">Download</a></li> </ul> </li> <li><a href="#build-instructions">build it</a> <ul> -<li><a href="#org3638199">requirements</a></li> -<li><a href="#org73a5d1c">make && install</a></li> +<li><a href="#org111dea7">requirements</a></li> +<li><a href="#org887e970">make && install</a></li> </ul> </li> -<li><a href="#org88418f5">for devs</a> +<li><a href="#org90d0470">for devs</a> <ul> -<li><a href="#org8949557">CMake options</a></li> -<li><a href="#orgaf8cc38">compiler</a></li> -<li><a href="#org336c3ed">tests</a> +<li><a href="#orgb40d88b">CMake options</a></li> +<li><a href="#org8004748">compiler</a></li> +<li><a href="#org206a328">tests</a> <ul> -<li><a href="#orgb9b2773">run tests</a></li> -<li><a href="#org98a43db">test suite</a></li> +<li><a href="#org9934a6f">run tests</a></li> +<li><a href="#org91a2119">test suite</a></li> </ul> </li> </ul> </li> -<li><a href="#orge6e9f86">ck configuration</a></li> +<li><a href="#orgc85202a">ck configuration</a></li> <li><a href="#usage">Usage</a> <ul> -<li><a href="#org034a512">Initialize</a></li> -<li><a href="#orgc8d3141">Add configs</a></li> -<li><a href="#org5984569">Using the ck actions</a></li> +<li><a href="#org5123075">Initialize</a></li> +<li><a href="#orga15fbdd">Add configs</a></li> +<li><a href="#orgf2b924a">Using the ck actions</a></li> </ul> </li> <li><a href="#manpage">manpage</a></li> @@ -269,9 +269,9 @@ for the JavaScript code in this tag. </div> </div> <p align="center"><img src="res/logo.png"></p> -<div id="outline-container-org501dc95" class="outline-2"> -<h2 id="org501dc95">ck</h2> -<div class="outline-text-2" id="text-org501dc95"> +<div id="outline-container-org10db10e" class="outline-2"> +<h2 id="org10db10e">ck</h2> +<div class="outline-text-2" id="text-org10db10e"> <p> <b>The Config Keeper</b> </p> @@ -281,7 +281,7 @@ Have you ever wondered: </p> <blockquote> <p> -"Jeez Luiz, how can I manage all my configs across my desktop and server?" +"Jeez Luise, how can I manage all my configs across my desktop and server?" </p> <p> @@ -325,11 +325,16 @@ and instruct it to save them in a different folder, so they won't be in the same place with the normal ones (in the event you want to share your configs with the rest of us). </p> + +<p> +You can even export all <b>ck</b> data with the <code>export</code> action. This will create a +<code>.tar.gz</code> file. +</p> </div> -<div id="outline-container-org34cb767" class="outline-3"> -<h3 id="org34cb767">Technicalities</h3> -<div class="outline-text-3" id="text-org34cb767"> +<div id="outline-container-orgd5becfe" class="outline-3"> +<h3 id="orgd5becfe">Technicalities</h3> +<div class="outline-text-3" id="text-orgd5becfe"> <p> Upon adding a config to <b>ck</b>, it moves it to the specified folder and adds a symbolic link back where it came from (<code>ln -s</code>). @@ -342,9 +347,9 @@ majority should). </div> </div> -<div id="outline-container-org090a724" class="outline-3"> -<h3 id="org090a724">Download</h3> -<div class="outline-text-3" id="text-org090a724"> +<div id="outline-container-org9006d02" class="outline-3"> +<h3 id="org9006d02">Download</h3> +<div class="outline-text-3" id="text-org9006d02"> <p> Go ahead and download <b>ck</b> and give it a try. It comes with a help sub-command that explains any inquires you might have. @@ -362,13 +367,13 @@ You can also read the manpage <a href="#manpage">down below</a>. </div> </div> -<div id="outline-container-org5314b35" class="outline-2"> -<h2 id="build-instructions"><a id="org5314b35"></a>build it</h2> +<div id="outline-container-org7d912d3" class="outline-2"> +<h2 id="build-instructions"><a id="org7d912d3"></a>build it</h2> <div class="outline-text-2" id="text-build-instructions"> </div> -<div id="outline-container-org3638199" class="outline-3"> -<h3 id="org3638199">requirements</h3> -<div class="outline-text-3" id="text-org3638199"> +<div id="outline-container-org111dea7" class="outline-3"> +<h3 id="org111dea7">requirements</h3> +<div class="outline-text-3" id="text-org111dea7"> <ul class="org-ul"> <li>cmake</li> <li>sqlite3-dev</li> @@ -377,9 +382,9 @@ You can also read the manpage <a href="#manpage">down below</a>. </div> </div> -<div id="outline-container-org73a5d1c" class="outline-3"> -<h3 id="org73a5d1c">make && install</h3> -<div class="outline-text-3" id="text-org73a5d1c"> +<div id="outline-container-org887e970" class="outline-3"> +<h3 id="org887e970">make && install</h3> +<div class="outline-text-3" id="text-org887e970"> <p> Use <code>-DCMAKE_INSTALL_PREFIX</code> when running cmake to change the install path. </p> @@ -402,16 +407,16 @@ Use <code>-DCMAKE_INSTALL_PREFIX</code> when running cmake to change the install </div> </div> -<div id="outline-container-org88418f5" class="outline-2"> -<h2 id="org88418f5">for devs</h2> -<div class="outline-text-2" id="text-org88418f5"> +<div id="outline-container-org90d0470" class="outline-2"> +<h2 id="org90d0470">for devs</h2> +<div class="outline-text-2" id="text-org90d0470"> <p> Please be <a href="https://www.gnu.org/philosophy/kind-communication.html">kind</a> to each other. </p> </div> -<div id="outline-container-org8949557" class="outline-3"> -<h3 id="org8949557">CMake options</h3> -<div class="outline-text-3" id="text-org8949557"> +<div id="outline-container-orgb40d88b" class="outline-3"> +<h3 id="orgb40d88b">CMake options</h3> +<div class="outline-text-3" id="text-orgb40d88b"> <p> cmake accepts the following options: </p> @@ -432,9 +437,9 @@ To use any one of them append it after the cmake command like so: </div> </div> -<div id="outline-container-orgaf8cc38" class="outline-3"> -<h3 id="orgaf8cc38">compiler</h3> -<div class="outline-text-3" id="text-orgaf8cc38"> +<div id="outline-container-org8004748" class="outline-3"> +<h3 id="org8004748">compiler</h3> +<div class="outline-text-3" id="text-org8004748"> <p> Pick your favorite </p> @@ -464,9 +469,9 @@ Pick your favorite </div> </div> -<div id="outline-container-org336c3ed" class="outline-3"> -<h3 id="org336c3ed">tests</h3> -<div class="outline-text-3" id="text-org336c3ed"> +<div id="outline-container-org206a328" class="outline-3"> +<h3 id="org206a328">tests</h3> +<div class="outline-text-3" id="text-org206a328"> <p> The testing "suite" is a bash script that runs regression and unit tests. Regression tests are under the <code>tests/</code> directory @@ -475,9 +480,9 @@ under <code>unit/</code> directory and test the code. </p> </div> -<div id="outline-container-orgb9b2773" class="outline-4"> -<h4 id="orgb9b2773">run tests</h4> -<div class="outline-text-4" id="text-orgb9b2773"> +<div id="outline-container-org9934a6f" class="outline-4"> +<h4 id="org9934a6f">run tests</h4> +<div class="outline-text-4" id="text-org9934a6f"> <p> First make sure you build ck with the <code>-DCK_TESTS=1</code> option. Then go to the build directory and type: @@ -486,12 +491,23 @@ go to the build directory and type: <pre class="src src-sh">$ ./test-ck </pre> </div> +<p> +Or if you want to run a particular regression test use the filter option +</p> +<div class="org-src-container"> +<pre class="src src-sh">$ ./test-ck -f add +</pre> +</div> +<p> +This will match any test scrits with <code>add</code> in their name. +</p> </div> </div> -<div id="outline-container-org98a43db" class="outline-4"> -<h4 id="org98a43db">test suite</h4> -<div class="outline-text-4" id="text-org98a43db"> + +<div id="outline-container-org91a2119" class="outline-4"> +<h4 id="org91a2119">test suite</h4> +<div class="outline-text-4" id="text-org91a2119"> <div class="org-src-container"> <pre class="src src-sh">$ ./test-ck -h ck test suite @@ -500,8 +516,10 @@ use without flags to run all tests flags: -u, --unit run only the unit tests -r, --regression run only the regression tests + -f, --filter run regression test matching the argument -c, --clear remove test files use if the tests crush unexpectedly + -v, --verbose verbose test output -h, --help, * print this </pre> </div> @@ -509,17 +527,17 @@ flags: </div> </div> </div> -<div id="outline-container-orge6e9f86" class="outline-2"> -<h2 id="orge6e9f86">ck configuration</h2> -<div class="outline-text-2" id="text-orge6e9f86"> +<div id="outline-container-orgc85202a" class="outline-2"> +<h2 id="orgc85202a">ck configuration</h2> +<div class="outline-text-2" id="text-orgc85202a"> <p> See the <a href="#manpage">manpage</a> below. </p> </div> </div> -<div id="outline-container-orgd582e7c" class="outline-2"> -<h2 id="usage"><a id="orgd582e7c"></a>Usage</h2> +<div id="outline-container-org0ed22f1" class="outline-2"> +<h2 id="usage"><a id="org0ed22f1"></a>Usage</h2> <div class="outline-text-2" id="text-usage"> <p> ck's goal is to assist with the configuration file management. @@ -529,9 +547,9 @@ ck's goal is to assist with the configuration file management. This section is an example usage. </p> </div> -<div id="outline-container-org034a512" class="outline-3"> -<h3 id="org034a512">Initialize</h3> -<div class="outline-text-3" id="text-org034a512"> +<div id="outline-container-org5123075" class="outline-3"> +<h3 id="org5123075">Initialize</h3> +<div class="outline-text-3" id="text-org5123075"> <div class="org-src-container"> <pre class="src src-sh"><span style="color: #528fd1;">cd</span> ~ <span style="color: #656565;"># </span><span style="color: #757575;">make the directories for the configs</span> @@ -544,9 +562,9 @@ $ ck init configs/vc configs/sec </div> </div> -<div id="outline-container-orgc8d3141" class="outline-3"> -<h3 id="orgc8d3141">Add configs</h3> -<div class="outline-text-3" id="text-orgc8d3141"> +<div id="outline-container-orga15fbdd" class="outline-3"> +<h3 id="orga15fbdd">Add configs</h3> +<div class="outline-text-3" id="text-orga15fbdd"> <div class="org-src-container"> <pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">add emacs configs</span> <span style="color: #656565;">## </span><span style="color: #757575;">primary config</span> @@ -574,9 +592,9 @@ $ sudo ck -c /home/ckuser add ssh /etc/ssh/sshd_config -s </div> </div> -<div id="outline-container-org5984569" class="outline-3"> -<h3 id="org5984569">Using the ck actions</h3> -<div class="outline-text-3" id="text-org5984569"> +<div id="outline-container-orgf2b924a" class="outline-3"> +<h3 id="orgf2b924a">Using the ck actions</h3> +<div class="outline-text-3" id="text-orgf2b924a"> <div class="org-src-container"> <pre class="src src-sh"><span style="color: #656565;"># </span><span style="color: #757575;">list the configs in a treelike structure with basename only</span> $ ck list tree -b @@ -628,11 +646,11 @@ $ ck --help e </div> </div> -<div id="outline-container-org6aa4382" class="outline-2"> -<h2 id="manpage"><a id="org6aa4382"></a>manpage</h2> +<div id="outline-container-org4efb467" class="outline-2"> +<h2 id="manpage"><a id="org4efb467"></a>manpage</h2> <div class="outline-text-2" id="text-manpage"> <!-- Creator : groff version 1.22.3 --> -<!-- CreationDate: Mon Nov 19 01:39:46 2018 --> +<!-- CreationDate: Tue Nov 20 13:48:12 2018 --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> @@ -722,7 +740,8 @@ manage configuration across the system</p> <td width="82%"> -<p><b>init</b> <i>VERSION_CONTROL_DIR SECRET_DIR</i></p></td> +<p><b>init</b> <i>VERSION_CONTROL_DIR</i> +[<i>SECRET_DIR</i>]</p> </td> <td width="3%"> </td></tr> <tr valign="top" align="left"> @@ -892,6 +911,19 @@ manage configuration across the system</p> <p><b>help </b><i>action</i></p></td> <td width="3%"> </td></tr> +<tr valign="top" align="left"> +<td width="11%"></td> +<td width="3%"> + + +<p><b>ck</b></p></td> +<td width="1%"></td> +<td width="82%"> + + +<p><b>export</b></p></td> +<td width="3%"> +</td></tr> </table> <h2>DESCRIPTION @@ -899,8 +931,7 @@ manage configuration across the system</p> </h2> - -<p style="margin-left:11%; margin-top: 1em"><i><b>ck</b></i> +<p style="margin-left:11%; margin-top: 1em"><b>ck</b> manages configuration files in a Linux system. To that end it provides an <b>action</b> based command line interface.</p> @@ -908,10 +939,10 @@ interface.</p> <p style="margin-left:11%; margin-top: 1em"><b>ck</b> needs a database and an rc file to run. It also needs two directories (stored in the rc file), the -<i>VERSION_CONRTOL_DIR</i> and the <i>SECRET_DIR</i>. This -is where the configurations will end up after they are added -to <b>ck</b>. The <b>init</b> action takes care of them. For -more details see the +<i>VERSION_CONRTOL_DIR</i> and (optionally) the +<i>SECRET_DIR</i>. This is where the configurations will end +up after they are added to <b>ck</b>. The <b>init</b> action +takes care of them. For more details see the <b>ACTIONS </b>and <b>FILES</b> sections below.</p> @@ -1003,7 +1034,10 @@ section above.</p> <br> Create the <b>ck</b> database (<i>ckdb</i>) and initialize it. Create the ck config file (<i>ckrc</i>) and add the -directory paths to it. <b><br> +directory paths to it. If <i>SECRET_DIR</i> is not passed, +the <b>−s</b> flag will be disabled in the <b>add</b> +action, and this <b>ck</b> instance won’t be able to +store secret configs. <b><br> USAGE</b></p> <table width="100%" border="0" rules="none" frame="void" @@ -1015,11 +1049,12 @@ USAGE</b></p> <p><b>ck</b></p></td> <td width="1%"></td> -<td width="54%"> +<td width="57%"> -<p><b>init</b> <i>VERSION_CONTROL_DIR SECRET_DIR</i></p></td> -<td width="28%"> +<p><b>init</b> <i>VERSION_CONTROL_DIR</i> +[<i>SECRET_DIR</i>]</p> </td> +<td width="25%"> </td></tr> </table> @@ -1062,7 +1097,8 @@ exist</b>.</p> </td></tr> <p style="margin-left:11%;"><b>EXAMPLES</b></p> <pre style="margin-left:14%;">$ ck init /home/ckuser/configs/vc home/ckuser/configs/sec -$ ck i configs/vc configs/sec</pre> +$ ck i configs/vc configs/sec +$ ck i ~/scripts # no secret dir provided</pre> <p style="margin-left:11%; margin-top: 1em"><b>ADD @@ -1776,6 +1812,52 @@ $ ck h d $ ck --help ls</pre> +<p style="margin-left:11%; margin-top: 1em"><b>EXPORT +CONFIGS <br> +ck</b> can export the config files it tracks as well as the +<i>ckrc</i> and <i>ckdb</i> files into a tar.gz archive. The +file is named ck.tar.gz <b><br> +USAGE</b></p> + +<table width="100%" border="0" rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="14%"></td> +<td width="3%"> + + +<p><b>ck</b></p></td> +<td width="1%"></td> +<td width="10%"> + + +<p><b>export</b></p></td> +<td width="72%"> +</td></tr> +</table> + +<p style="margin-left:11%;"><b>ALIASES</b></p> + + +<p style="margin-left:14%;"><b>export</b>, <b>−−export</b>, <b>−ex</b></p> + +<p style="margin-left:11%;"><b>ARGUMENTS</b></p> + +<table width="100%" border="0" rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="14%"></td> +<td width="8%"> + + +<p>None.</p></td> +<td width="78%"> +</td></tr> +</table> + +<p style="margin-left:11%;"><b>EXAMPLES</b></p> +<pre style="margin-left:14%;">$ ck export</pre> + <h2>EXIT STATUS <a name="EXIT STATUS"></a> </h2> @@ -1854,7 +1936,7 @@ flags</b>: @CMAKE_C_FLAGS@</p> </div> </div> <div id="postamble" class="status"> -<p class="date">Created: 2018-11-19 Mon 01:39</p> +<p class="date">Created: 2018-11-20 Tue 13:48</p> <p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p> </div> </body> |