Blob Blame History Raw
@subsection Goals

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

@subsection Description

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

When you type the @command{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 @var{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 @file{~/bin/} directory that points to the
@command{centos-art.sh} script file. As @file{~/bin/} directory is, by
default, inside @var{PATH} environment variable, the execution of
@command{centos-art} command runs the @file{centos-art.sh} script.

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

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

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

@float Figure,fig:trunk/Scripts/Bash:Initialization
@verbatim
+------------------------------------------------------------------+
| [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 |   .   .   .
    .   .   .   +-----------------+   .   .   .
    .   .   ...........................   .   .
    .   ...................................   .
    ...........................................
@end verbatim
@caption{The @command{centos-art.sh} initialization environment.}
@end float

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

@subsubsection Adding new features

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

@subsection Usage

@subsubsection The @command{centos-art} @samp{check} action

This feature is supported through the following command:

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

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

@subsubsection The @command{centos-art} @samp{search} action

This feature is not supported yet.

@table @samp
@item centos-art search 'pattern' 

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

@item centos-art search 'pattern1 pattern2 patternN' 

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

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

Use this command to search repository entries that match
@samp{path/to/dir1} @emph{or} @samp{path/to/dir2}, @emph{or}
@samp{path/to/dirN} as in
@samp{^.*(path/to/dir1|path/to/dir2|path/to/dirN).*$'}.
@end table

@subsubsection The @command{centos-art} @samp{locale-art} action

This feature is not supported yet.

@table @samp
@item centos-art locale-art 'path/to/dir' --edit
@item centos-art locale-art 'path/to/dir' --edit='filename'
@item centos-art locale-art 'path/to/dir' --list
@item centos-art locale-art 'path/to/dir' --list='filename'
@end table

@subsubsection The @command{centos-art} @samp{license} action

This feature is supported through the following command:

@table @samp
@item centos-art license
Use this command to see a brief description of @command{centos-art}
command its copyright and its license notes.
@end table

@subsection See also

@menu
* trunk Scripts Bash Functions::
* trunk Scripts Bash Locale::
* trunk Scripts::
@end menu