aboutsummaryrefslogtreecommitdiffstats
path: root/README.html
diff options
context:
space:
mode:
Diffstat (limited to 'README.html')
-rw-r--r--README.html253
1 files changed, 170 insertions, 83 deletions
diff --git a/README.html b/README.html
index 6c38c37..215584d 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-20 Tue 13:48 -->
+<!-- 2018-11-20 Tue 20:21 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>&lrm;</title>
@@ -232,36 +232,37 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
-<li><a href="#org10db10e">ck</a>
+<li><a href="#org0e0ea28">ck</a>
<ul>
-<li><a href="#orgd5becfe">Technicalities</a></li>
-<li><a href="#org9006d02">Download</a></li>
+<li><a href="#org75bd278">Technicalities</a></li>
+<li><a href="#org7b74163">Download</a></li>
</ul>
</li>
<li><a href="#build-instructions">build it</a>
<ul>
-<li><a href="#org111dea7">requirements</a></li>
-<li><a href="#org887e970">make &amp;&amp; install</a></li>
+<li><a href="#org7418c21">requirements</a></li>
+<li><a href="#org8552dd5">make &amp;&amp; install</a></li>
</ul>
</li>
-<li><a href="#org90d0470">for devs</a>
+<li><a href="#org5c96039">for devs</a>
<ul>
-<li><a href="#orgb40d88b">CMake options</a></li>
-<li><a href="#org8004748">compiler</a></li>
-<li><a href="#org206a328">tests</a>
+<li><a href="#org82929b2">CMake options</a></li>
+<li><a href="#org727ad65">compiler</a></li>
+<li><a href="#org64d45ce">tests</a>
<ul>
-<li><a href="#org9934a6f">run tests</a></li>
-<li><a href="#org91a2119">test suite</a></li>
+<li><a href="#org7eef031">run tests</a></li>
+<li><a href="#org00a6b39">test suite</a></li>
</ul>
</li>
</ul>
</li>
-<li><a href="#orgc85202a">ck configuration</a></li>
+<li><a href="#orge40edff">ck configuration</a></li>
<li><a href="#usage">Usage</a>
<ul>
-<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>
+<li><a href="#org498e586">Initialize</a></li>
+<li><a href="#orged99083">Add configs</a></li>
+<li><a href="#orge5ed33e">Using the ck actions</a></li>
+<li><a href="#org188208d">Copying configs to a different linux system</a></li>
</ul>
</li>
<li><a href="#manpage">manpage</a></li>
@@ -269,9 +270,9 @@ for the JavaScript code in this tag.
</div>
</div>
<p align="center"><img src="res/logo.png"></p>
-<div id="outline-container-org10db10e" class="outline-2">
-<h2 id="org10db10e">ck</h2>
-<div class="outline-text-2" id="text-org10db10e">
+<div id="outline-container-org0e0ea28" class="outline-2">
+<h2 id="org0e0ea28">ck</h2>
+<div class="outline-text-2" id="text-org0e0ea28">
<p>
<b>The Config Keeper</b>
</p>
@@ -332,9 +333,9 @@ You can even export all <b>ck</b> data with the <code>export</code> action. This
</p>
</div>
-<div id="outline-container-orgd5becfe" class="outline-3">
-<h3 id="orgd5becfe">Technicalities</h3>
-<div class="outline-text-3" id="text-orgd5becfe">
+<div id="outline-container-org75bd278" class="outline-3">
+<h3 id="org75bd278">Technicalities</h3>
+<div class="outline-text-3" id="text-org75bd278">
<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>).
@@ -347,9 +348,9 @@ majority should).
</div>
</div>
-<div id="outline-container-org9006d02" class="outline-3">
-<h3 id="org9006d02">Download</h3>
-<div class="outline-text-3" id="text-org9006d02">
+<div id="outline-container-org7b74163" class="outline-3">
+<h3 id="org7b74163">Download</h3>
+<div class="outline-text-3" id="text-org7b74163">
<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.
@@ -367,13 +368,13 @@ You can also read the manpage <a href="#manpage">down below</a>.
</div>
</div>
-<div id="outline-container-org7d912d3" class="outline-2">
-<h2 id="build-instructions"><a id="org7d912d3"></a>build it</h2>
+<div id="outline-container-org5a78f5e" class="outline-2">
+<h2 id="build-instructions"><a id="org5a78f5e"></a>build it</h2>
<div class="outline-text-2" id="text-build-instructions">
</div>
-<div id="outline-container-org111dea7" class="outline-3">
-<h3 id="org111dea7">requirements</h3>
-<div class="outline-text-3" id="text-org111dea7">
+<div id="outline-container-org7418c21" class="outline-3">
+<h3 id="org7418c21">requirements</h3>
+<div class="outline-text-3" id="text-org7418c21">
<ul class="org-ul">
<li>cmake</li>
<li>sqlite3-dev</li>
@@ -382,9 +383,9 @@ You can also read the manpage <a href="#manpage">down below</a>.
</div>
</div>
-<div id="outline-container-org887e970" class="outline-3">
-<h3 id="org887e970">make &amp;&amp; install</h3>
-<div class="outline-text-3" id="text-org887e970">
+<div id="outline-container-org8552dd5" class="outline-3">
+<h3 id="org8552dd5">make &amp;&amp; install</h3>
+<div class="outline-text-3" id="text-org8552dd5">
<p>
Use <code>-DCMAKE_INSTALL_PREFIX</code> when running cmake to change the install path.
</p>
@@ -394,7 +395,7 @@ Use <code>-DCMAKE_INSTALL_PREFIX</code> when running cmake to change the install
<span style="color: #656565;"># </span><span style="color: #757575;">make a build directory and enter it</span>
&gt; mkdir ~/ck_build; <span style="color: #528fd1;">cd</span> ~/ck_build;
<span style="color: #656565;"># </span><span style="color: #757575;">run cmake</span>
-&gt; cmake ~/code/ck
+&gt; cmake ~/code/ck
<span style="color: #656565;"># </span><span style="color: #757575;">run make</span>
&gt; make
<span style="color: #656565;"># </span><span style="color: #757575;">install it</span>
@@ -407,16 +408,16 @@ Use <code>-DCMAKE_INSTALL_PREFIX</code> when running cmake to change the install
</div>
</div>
-<div id="outline-container-org90d0470" class="outline-2">
-<h2 id="org90d0470">for devs</h2>
-<div class="outline-text-2" id="text-org90d0470">
+<div id="outline-container-org5c96039" class="outline-2">
+<h2 id="org5c96039">for devs</h2>
+<div class="outline-text-2" id="text-org5c96039">
<p>
Please be <a href="https://www.gnu.org/philosophy/kind-communication.html">kind</a> to each other.
</p>
</div>
-<div id="outline-container-orgb40d88b" class="outline-3">
-<h3 id="orgb40d88b">CMake options</h3>
-<div class="outline-text-3" id="text-orgb40d88b">
+<div id="outline-container-org82929b2" class="outline-3">
+<h3 id="org82929b2">CMake options</h3>
+<div class="outline-text-3" id="text-org82929b2">
<p>
cmake accepts the following options:
</p>
@@ -437,9 +438,9 @@ To use any one of them append it after the cmake command like so:
</div>
</div>
-<div id="outline-container-org8004748" class="outline-3">
-<h3 id="org8004748">compiler</h3>
-<div class="outline-text-3" id="text-org8004748">
+<div id="outline-container-org727ad65" class="outline-3">
+<h3 id="org727ad65">compiler</h3>
+<div class="outline-text-3" id="text-org727ad65">
<p>
Pick your favorite
</p>
@@ -469,9 +470,9 @@ Pick your favorite
</div>
</div>
-<div id="outline-container-org206a328" class="outline-3">
-<h3 id="org206a328">tests</h3>
-<div class="outline-text-3" id="text-org206a328">
+<div id="outline-container-org64d45ce" class="outline-3">
+<h3 id="org64d45ce">tests</h3>
+<div class="outline-text-3" id="text-org64d45ce">
<p>
The testing "suite" is a bash script that runs regression
and unit tests. Regression tests are under the <code>tests/</code> directory
@@ -480,9 +481,9 @@ under <code>unit/</code> directory and test the code.
</p>
</div>
-<div id="outline-container-org9934a6f" class="outline-4">
-<h4 id="org9934a6f">run tests</h4>
-<div class="outline-text-4" id="text-org9934a6f">
+<div id="outline-container-org7eef031" class="outline-4">
+<h4 id="org7eef031">run tests</h4>
+<div class="outline-text-4" id="text-org7eef031">
<p>
First make sure you build ck with the <code>-DCK_TESTS=1</code> option. Then
go to the build directory and type:
@@ -505,9 +506,9 @@ This will match any test scrits with <code>add</code> in their name.
</div>
-<div id="outline-container-org91a2119" class="outline-4">
-<h4 id="org91a2119">test suite</h4>
-<div class="outline-text-4" id="text-org91a2119">
+<div id="outline-container-org00a6b39" class="outline-4">
+<h4 id="org00a6b39">test suite</h4>
+<div class="outline-text-4" id="text-org00a6b39">
<div class="org-src-container">
<pre class="src src-sh">$ ./test-ck -h
ck test suite
@@ -527,17 +528,17 @@ flags:
</div>
</div>
</div>
-<div id="outline-container-orgc85202a" class="outline-2">
-<h2 id="orgc85202a">ck configuration</h2>
-<div class="outline-text-2" id="text-orgc85202a">
+<div id="outline-container-orge40edff" class="outline-2">
+<h2 id="orge40edff">ck configuration</h2>
+<div class="outline-text-2" id="text-orge40edff">
<p>
See the <a href="#manpage">manpage</a> below.
</p>
</div>
</div>
-<div id="outline-container-org0ed22f1" class="outline-2">
-<h2 id="usage"><a id="org0ed22f1"></a>Usage</h2>
+<div id="outline-container-org3eb4040" class="outline-2">
+<h2 id="usage"><a id="org3eb4040"></a>Usage</h2>
<div class="outline-text-2" id="text-usage">
<p>
ck's goal is to assist with the configuration file management.
@@ -547,9 +548,9 @@ ck's goal is to assist with the configuration file management.
This section is an example usage.
</p>
</div>
-<div id="outline-container-org5123075" class="outline-3">
-<h3 id="org5123075">Initialize</h3>
-<div class="outline-text-3" id="text-org5123075">
+<div id="outline-container-org498e586" class="outline-3">
+<h3 id="org498e586">Initialize</h3>
+<div class="outline-text-3" id="text-org498e586">
<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>
@@ -562,9 +563,9 @@ $ ck init configs/vc configs/sec
</div>
</div>
-<div id="outline-container-orga15fbdd" class="outline-3">
-<h3 id="orga15fbdd">Add configs</h3>
-<div class="outline-text-3" id="text-orga15fbdd">
+<div id="outline-container-orged99083" class="outline-3">
+<h3 id="orged99083">Add configs</h3>
+<div class="outline-text-3" id="text-orged99083">
<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>
@@ -592,9 +593,9 @@ $ sudo ck -c /home/ckuser add ssh /etc/ssh/sshd_config -s
</div>
</div>
-<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 id="outline-container-orge5ed33e" class="outline-3">
+<h3 id="orge5ed33e">Using the ck actions</h3>
+<div class="outline-text-3" id="text-orge5ed33e">
<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
@@ -633,9 +634,9 @@ $ ck delete emacs
$ ck del emacs init.el
<span style="color: #656565;"># </span><span style="color: #757575;">restore all links (on a new instalation)</span>
-$ ck restore all
+$ ck restore --all
<span style="color: #656565;"># </span><span style="color: #757575;">restore a program's links</span>
-$ ck r -p emacs
+$ ck r emacs
<span style="color: #656565;"># </span><span style="color: #757575;">get help for an action</span>
$ ck h add
@@ -644,13 +645,99 @@ $ ck --help e
</div>
</div>
</div>
+
+<div id="outline-container-org188208d" class="outline-3">
+<h3 id="org188208d">Copying configs to a different linux system</h3>
+<div class="outline-text-3" id="text-org188208d">
+<p>
+Using the method described below one can use ck
+to copy the configs to a different linux system.
+In this example we assume we have the ck instance we created
+above and we want to copy some configs to our new VPS.
+</p>
+
+<p>
+We will also assume that the VPS' username is different
+that the one on our desktop (<code>ckuser</code> in our example).
+</p>
+</div>
+
+<ul class="org-ul">
+<li><a id="org47ab060"></a>Start at the desktop by exporting the ck files<br />
+<div class="outline-text-5" id="text-org47ab060">
+<div class="org-src-container">
+<pre class="src src-sh">you@desktop -&gt; ck export
+</pre>
+</div>
+</div>
+</li>
+
+<li><a id="org129ddcb"></a>Copy the resulting tar file to the server<br />
+<div class="outline-text-5" id="text-org129ddcb">
+<div class="org-src-container">
+<pre class="src src-sh">you@desktop -&gt; scp ck.tar.gz ckuser@server:/home/ckuser
+</pre>
+</div>
+</div>
+</li>
+
+<li><a id="org11d79a3"></a>Now we ssh to the server<br />
+<div class="outline-text-5" id="text-org11d79a3">
+<div class="org-src-container">
+<pre class="src src-sh">you@desktop -&gt; ssh ckuser@server
+</pre>
+</div>
+</div>
+</li>
+
+<li><a id="orgf935871"></a>Start by untaring the archive &amp; installing ck<br />
+<div class="outline-text-5" id="text-orgf935871">
+<div class="org-src-container">
+<pre class="src src-sh">ckuser@server -&gt; tar zxf ck.tar.gz
+</pre>
+</div>
+</div>
+</li>
+
+<li><a id="org3387d36"></a>Move the <i><i>version_control_dir</i></i> and <i><i>secer_dir</i></i> to where you want them to be<br /></li>
+<li><a id="orge754263"></a>Move the <i><i>ckrc</i></i> and <i><i>ckdb</i></i> files where you want ck config home to be<br /></li>
+<li><a id="org494b09d"></a>Edit <i><i>ckrc</i></i> and change the <b>home_dir</b> to /home/ckuser<br /></li>
+<li><a id="orgb534be5"></a>Also change <i><i>secret_dir</i></i> and <i><i>version_control_dir</i></i> to where you placed them before<br /></li>
+<li><a id="org647fa34"></a>Make sure ck will find your config by default by setting the $CK_CONFIG environment variable<br />
+<div class="outline-text-5" id="text-org647fa34">
+<p>
+Edit bashrc to make this permanent.
+</p>
+<div class="org-src-container">
+<pre class="src src-sh">ckuser@server -&gt; export <span style="color: #baba36;">CK_CONFIG</span>=/where/you/have/ckrc/and/ckdb
+</pre>
+</div>
+
+<p>
+Note, you might not have to use this if you use one of the default config locations.
+ck will first check $XDG_CONFIG_HOME/ck and then $HOME/.ck so using either one of these will do.
+</p>
+</div>
+</li>
+<li><a id="org9fe13ce"></a>Remove any existing conflicting configs<br /></li>
+<li><a id="orgf0586c6"></a>Restore your configs<br />
+<div class="outline-text-5" id="text-orgf0586c6">
+<div class="org-src-container">
+<pre class="src src-sh">ckuser@server -&gt; ck restore zsh
+ckuser@server -&gt; ck restore emacs
+</pre>
+</div>
+</div>
+</li>
+</ul>
+</div>
</div>
-<div id="outline-container-org4efb467" class="outline-2">
-<h2 id="manpage"><a id="org4efb467"></a>manpage</h2>
+<div id="outline-container-org6964442" class="outline-2">
+<h2 id="manpage"><a id="org6964442"></a>manpage</h2>
<div class="outline-text-2" id="text-manpage">
<!-- Creator : groff version 1.22.3 -->
-<!-- CreationDate: Tue Nov 20 13:48:12 2018 -->
+<!-- CreationDate: Tue Nov 20 20:21:23 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -882,7 +969,7 @@ manage configuration across the system</p>
<td width="82%">
-<p><b>restore &minus;p</b> <i>PROGRAM_NAME</i></p></td>
+<p><b>restore</b> <i>PROGRAM_NAME</i></p></td>
<td width="3%">
</td></tr>
<tr valign="top" align="left">
@@ -895,7 +982,7 @@ manage configuration across the system</p>
<td width="82%">
-<p><b>restore all</b></p></td>
+<p><b>restore &minus;&minus;all</b></p></td>
<td width="3%">
</td></tr>
<tr valign="top" align="left">
@@ -1700,11 +1787,11 @@ USAGE</b></p>
<p><b>ck</b></p></td>
<td width="1%"></td>
-<td width="36%">
+<td width="31%">
-<p><b>restore &minus;p</b> <i>PROGRAM_NAME</i></p></td>
-<td width="46%">
+<p><b>restore</b> <i>PROGRAM_NAME</i></p></td>
+<td width="51%">
</td></tr>
<tr valign="top" align="left">
<td width="14%"></td>
@@ -1713,11 +1800,11 @@ USAGE</b></p>
<p><b>ck</b></p></td>
<td width="1%"></td>
-<td width="36%">
+<td width="31%">
-<p><b>restore all</b></p></td>
-<td width="46%">
+<p><b>restore &minus;&minus;all</b></p></td>
+<td width="51%">
</td></tr>
</table>
@@ -1746,7 +1833,7 @@ USAGE</b></p>
<td width="18%">
-<p><b>all</b></p></td>
+<p><b>--all</b></p></td>
<td width="14%"></td>
<td width="54%">
@@ -1756,8 +1843,8 @@ USAGE</b></p>
<p style="margin-left:11%;"><b>EXAMPLES</b></p>
-<pre style="margin-left:14%;">$ ck restore all
-$ ck restore -p emacs</pre>
+<pre style="margin-left:14%;">$ ck restore --all
+$ ck restore emacs</pre>
<p style="margin-left:11%; margin-top: 1em"><b>GET HELP</b>
@@ -1936,7 +2023,7 @@ flags</b>: @CMAKE_C_FLAGS@</p>
</div>
</div>
<div id="postamble" class="status">
-<p class="date">Created: 2018-11-20 Tue 13:48</p>
+<p class="date">Created: 2018-11-20 Tue 20:21</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>