Goals
-----

The trunk/Scripts/Bash directory exists to organize the ``trunk'' development line of centos-art.sh automation script.  The centos-art.sh script standardize frequent tasks inside your working copy of CentOS Artwork Repository.

Description
-----------

The best way to understand centos-art.sh automation script is studying its source code. The centos-art.sh script is splited in several configuration and function files which are loaded when the centos-art.sh script is executed. This section describes the order in which centos-art.sh loads its configuration and function files.

When you type the centos-art command in your terminal, the operating system trys to execute that command. In order to execute the command, the operating system needs to know where it is, so the operating system uses the PATH environment variable to look for that command's location. If your system was prepared to use CentOS Artwork Repository correctly (see usage section above), you should have a symbolic link inside ~/bin/ directory that points to the centos-art.sh script file. As ~/bin/ directory is, by default, inside PATH environment variable, the execution of centos-art command runs the centos-art.sh script.

When centos-art.sh script is executed, the first it does is execute the trunk/Scripts/Bash/initFunctions.sh file to initialize gettext variables and all function scripts inside trunk/Scripts/Bash/Functions directory.

Once gettext variables and all function scripts have been initialized, the centos-art.sh script initializes its environment variables using the cli_getVariables function. At this point the centos-art.sh script calls the cli_getActions function from cli_getVariables function's bottom.

The cli_getActions function defines which actions the centos-art.sh script is able to perform. Inside cli_getActions function, actions are defined combining positional arguments and function calls.

+------------------------------------------------------------------+
| [centos@host]$ centos-art action 'path/to/dir' --option='value'  |
+------------------------------------------------------------------+
| ~/bin/centos-art --> ~/artwork/trunk/Scripts/Bash/centos-art.sh  |
+---v-----------------------------------------v--------------------+
    | centos-art.sh                           |
    +---v---------------------------------v---+
    .   | initFunctions.sh                |   .
    .   +---------------------------------+   .
    .   | cli_getVariables $@             |   .
    .   +---v-------------------------v---+   .
    .   .   | cli_getActions          |   .   .
    .   .   +---v-----------------v---+   .   .
    .   .   .   | function call 1 |   .   .   .
    .   .   .   | function call 2 |   .   .   .
    .   .   .   | function call n |   .   .   .
    .   .   .   +-----------------+   .   .   .
    .   .   ...........................   .   .
    .   ...................................   .
    ...........................................
Figure: The centos-art.sh initialization environment.

The identity matching list
..........................

The identity matching list is used by identity rendering functions to define the relation between translation files and identity design templates.

Adding new features
...................

To add new features inside centos-art.sh script, you need to set positional arguments and function calls inside cli_getActions function for the new function or functions required by the new feature you want to add.

Usage
-----

The centos-art check action
...........................

This feature is supported through the following command:

centos-art check
     This command verifies paths, symbolic links, installed packages and everything your workstation needs in order to run the centos-art command correctly.

          Warning If this is the first time you run centos-art command, the appropriate way to execute check action is not using the centos-art command, but the absolute path to centos-art.sh script instead:
          ~/artwork/trunk/Scripts/Bash/centos-art.sh check

The centos-art search action
............................

This feature is not supported yet.

centos-art search 'pattern'

     Use this command to find directories and files that match exactly the posix-regular expression set in pattern as in ^pattern$.

centos-art search 'pattern1 pattern2 patternN'

     Use this command to search repository entries that match pattern1 or patter2 or patternN as in '^.*(pattern1|pattern2|patternN).*$'.

centos-art search 'path/to/dir1 path/to/dir2 path/to/dirN'

     Use this command to search repository entries that match path/to/dir1 or path/to/dir2, or path/to/dirN as in ^.*(path/to/dir1|path/to/dir2|path/to/dirN).*$'.

The centos-art locale-art action
................................

This feature is not supported yet.

centos-art locale-art 'path/to/dir' --edit

centos-art locale-art 'path/to/dir' --edit='filename'

centos-art locale-art 'path/to/dir' --list

centos-art locale-art 'path/to/dir' --list='filename'

The centos-art license action
.............................

This feature is supported through the following command:

centos-art license
     Use this command to see a brief description of centos-art command its copyright and its license notes.

See also
--------