Skip to content

matthewstory/d2cdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

d2cdb is a tool for building cdbs from file system hierarchies.

usage: d2cdb [-amorth] cdb_file tmp_file directory [directory ...]
    a : include directory entries whose names begin with a dot (`.')
    m : remove the file name from the cdb key
    o : replace earlier cdb entries if the keys are identical
    r : reverse the directory traversal order (implies `-o')
    t : unused option for compatibility
    h : show the help

    d2cdb takes n directories and recursively maps the file contents of each
    directory into a cdb keyed on the relative path to the file (from the root
    path/to/dir).

    If the -m option is given, d2cdb will recursively map the file contents of
    the directory into a cdb keyed on the relative leaf directory path, using
    the filename to order the leaf directory key.

    If the -o option is given, d2cdb will override/replace earlier cdb entires
    with later cdb entries if the keys are identical.

To build and install:
    `make && sudo make install && make clean' in the `src' directory will build
    and install with the following:

        gcc d2cdb.c -o d2cdb -Wall -O2 -std=c99 -I/usr/local/include -L/usr/local/lib -lcdb -g
        install -o root -g wheel -m 0555 d2cdb /usr/local/bin

    gcc options may be given with `CFLAGS':

        make CFLAGS="-g -DDEBUG"

    install options may be given with `INSTALL_FLAGS':

        sudo make INSTALL_FLAGS="-o root -g www -m 550" install

Exit Codes:
      0) success
    100) error

Dependencies:
    + TinyCDB 0.77: http://www.corpit.ru/mjt/tinycdb.html

Tested with:
    + FreeBSD 8.0
    + gcc 4.2.1

About

maps a directory structure to a cdb (shell version)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages