From da31bfd28301d63571eccb4abdd6b0a65b05c621 Mon Sep 17 00:00:00 2001 From: gramanas Date: Tue, 20 Nov 2018 13:49:36 +0200 Subject: Add export action, fix util_is_link bug --- README.html | 246 ++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 164 insertions(+), 82 deletions(-) (limited to 'README.html') 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"> - + @@ -232,36 +232,36 @@ for the JavaScript code in this tag.

Table of Contents

-
-

ck

-
+
+

ck

+

The Config Keeper

@@ -281,7 +281,7 @@ Have you ever wondered:

-"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?"

@@ -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).

+ +

+You can even export all ck data with the export action. This will create a +.tar.gz file. +

-
-

Technicalities

-
+
+

Technicalities

+

Upon adding a config to ck, it moves it to the specified folder and adds a symbolic link back where it came from (ln -s). @@ -342,9 +347,9 @@ majority should).

-
-

Download

-
+
+

Download

+

Go ahead and download ck 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 down below.

-
-

build it

+
+

build it

-
-

requirements

-
+
+

requirements

+
  • cmake
  • sqlite3-dev
  • @@ -377,9 +382,9 @@ You can also read the manpage down below.
-
-

make && install

-
+
+

make && install

+

Use -DCMAKE_INSTALL_PREFIX when running cmake to change the install path.

@@ -402,16 +407,16 @@ Use -DCMAKE_INSTALL_PREFIX when running cmake to change the install
-
-

for devs

-
+
+

for devs

+

Please be kind to each other.

-
-

CMake options

-
+
+

CMake options

+

cmake accepts the following options:

@@ -432,9 +437,9 @@ To use any one of them append it after the cmake command like so:
-
-

compiler

-
+
+

compiler

+

Pick your favorite

@@ -464,9 +469,9 @@ Pick your favorite
-
-

tests

-
+
+

tests

+

The testing "suite" is a bash script that runs regression and unit tests. Regression tests are under the tests/ directory @@ -475,9 +480,9 @@ under unit/ directory and test the code.

-
-

run tests

-
+
+

run tests

+

First make sure you build ck with the -DCK_TESTS=1 option. Then go to the build directory and type: @@ -486,12 +491,23 @@ go to the build directory and type:

$ ./test-ck
 
+

+Or if you want to run a particular regression test use the filter option +

+
+
$ ./test-ck -f add
+
+
+

+This will match any test scrits with add in their name. +

-
-

test suite

-
+ +
+

test suite

+
$ ./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
 
@@ -509,17 +527,17 @@ flags:
-
-

ck configuration

-
+
+

ck configuration

+

See the manpage below.

-
-

Usage

+
+

Usage

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.

-
-

Initialize

-
+
+

Initialize

+
cd ~
 # make the directories for the configs
@@ -544,9 +562,9 @@ $ ck init configs/vc configs/sec
 
-
-

Add configs

-
+
+

Add configs

+
# add emacs configs
 ## primary config
@@ -574,9 +592,9 @@ $ sudo ck -c /home/ckuser add ssh /etc/ssh/sshd_config -s
 
-
-

Using the ck actions

-
+
+

Using the ck actions

+
# list the configs in a treelike structure with basename only
 $ ck list tree -b
@@ -628,11 +646,11 @@ $ ck --help e
 
-
-

manpage

+
+

manpage

- + @@ -722,7 +740,8 @@ manage configuration across the system

-

init VERSION_CONTROL_DIR SECRET_DIR

+

init VERSION_CONTROL_DIR +[SECRET_DIR]

@@ -892,6 +911,19 @@ manage configuration across the system

help action

+ + + + + +

ck

+ + + + +

export

+ +

DESCRIPTION @@ -899,8 +931,7 @@ manage configuration across the system

- -

ck +

ck manages configuration files in a Linux system. To that end it provides an action based command line interface.

@@ -908,10 +939,10 @@ interface.

ck needs a database and an rc file to run. It also needs two directories (stored in the rc file), the -VERSION_CONRTOL_DIR and the SECRET_DIR. This -is where the configurations will end up after they are added -to ck. The init action takes care of them. For -more details see the +VERSION_CONRTOL_DIR and (optionally) the +SECRET_DIR. This is where the configurations will end +up after they are added to ck. The init action +takes care of them. For more details see the ACTIONS and FILES sections below.

@@ -1003,7 +1034,10 @@ section above.


Create the ck database (ckdb) and initialize it. Create the ck config file (ckrc) and add the -directory paths to it.
+directory paths to it. If SECRET_DIR is not passed, +the −s flag will be disabled in the add +action, and this ck instance won’t be able to +store secret configs.
USAGE

ck

- - +
+ -

init VERSION_CONTROL_DIR SECRET_DIR

+

init VERSION_CONTROL_DIR +[SECRET_DIR]

@@ -1062,7 +1097,8 @@ exist
.

EXAMPLES

$ ck init /home/ckuser/configs/vc home/ckuser/configs/sec
-$ ck i configs/vc configs/sec
+$ ck i configs/vc configs/sec +$ ck i ~/scripts # no secret dir provided

ADD @@ -1776,6 +1812,52 @@ $ ck h d $ ck --help ls +

EXPORT +CONFIGS
+ck
can export the config files it tracks as well as the +ckrc and ckdb files into a tar.gz archive. The +file is named ck.tar.gz
+USAGE

+ + + + + + + + +
+ + +

ck

+ + +

export

+
+ +

ALIASES

+ + +

export−−export−ex

+ +

ARGUMENTS

+ + + + + + +
+ + +

None.

+
+ +

EXAMPLES

+
$ ck export
+

EXIT STATUS

@@ -1854,7 +1936,7 @@ flags
: @CMAKE_C_FLAGS@

-

Created: 2018-11-19 Mon 01:39

+

Created: 2018-11-20 Tue 13:48

Validate

-- cgit v1.2.3