SYNOPSIS
- klone [klone_opts] [-c cmd] [cmd_opts] [cmd_args]
DESCRIPTION
klone
The translation phase is rarely seen by the user since it is hidden in the Makefile of the site building directory, i.e. ${KLONE_SRC_DIR}/site. Generally, the developer gets an embedded version of his/her site by providing the following command sequence:
$ cd ${KLONE_SRC_DIR}/site $ ../src/tools/klone/klone -c import ${SITE_BASE_DIR} $ make
The latter make invocation calls 'klone -c translate' over the imported files to perform the needed translation and registering (pre-linking).
Note that whenever a source file is added, removed or renamed, or in case the embedded file system encrypting key changes, the import operation must be done again.
The subsequent phase, by which the embedded site is linked to the kloned server skeleton, does not involve klone anymore. Nevertheless, the steps are illustrated here for reference:
$ cd ${KLONE_SRC_DIR} $ make
That's all.
OPTIONS
- -h
- Display a brief help and exit.
- -v
- Enable verbose mode.
- -V
- Print klone version and exit.
COMMANDS
Translate:
-
klone -c translate -i infile -o outfile -u uri [-E] [-k keyfile] [-z]
The -u option specifies the uri associated with the translated file.
The -E option tells klone to encrypt the file content with the key enclosed in the supplied keyfile or in the environment variable KLONE_CIPHER_KEY using AES-256 CBC.
The contents of the translated files are compressed based on their MIME type if the -z flag is given.
Import:
-
klone -c import [-b uri] [-e pattern] [-x pattern] [-k keyfile] [-Z pattern] [-z] dir
When the -e flag is given, the files matching the specified pattern will be encrypted using the key enclosed in the supplied keyfile or in the environment variable KLONE_CIPHER_KEY.
The user can choose whether to compress all the imported files based on their MIME type, using the -z flag, or to select a subset matching the supplied shell pattern.
If, while importing, you don't want to include a set of files you can use the -x argument to provide the pattern of files you want to exclude.
Arguments -x, -Z and -e may be used more then once.
ENVIRONMENT
The following environment variable affects the execution of klone:
- KLONE_CIPHER_KEY
- If set, klone tries to read the embedded file system encryption key from it. It is be overridden by the -k option.
DIAGNOSTICS
The klone utility exits with EXIT_SUCCESS on success, and with EXIT_FAILURE if an error occurs.