|
|
4c79b5 |
@subsection Goals
|
|
|
4c79b5 |
|
|
|
4c79b5 |
The @file{trunk/Scripts/Bash} directory exists to organize the
|
|
|
4c79b5 |
``trunk'' development line of @command{centos-art.sh} automation
|
|
|
4c79b5 |
script. The @command{centos-art.sh} script standardize frequent tasks
|
|
|
4c79b5 |
inside your working copy of CentOS Artwork Repository.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsection Description
|
|
|
4c79b5 |
|
|
|
4c79b5 |
The best way to understand @command{centos-art.sh} automation script
|
|
|
4c79b5 |
is studying its source code. The @command{centos-art.sh} script is
|
|
|
4c79b5 |
splited in several configuration and function files which are loaded
|
|
|
4c79b5 |
when the @command{centos-art.sh} script is executed. This section
|
|
|
4c79b5 |
describes the order in which @command{centos-art.sh} loads its
|
|
|
4c79b5 |
configuration and function files.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
When you type the @command{centos-art} command in your terminal, the
|
|
|
4c79b5 |
operating system trys to execute that command. In order to execute the
|
|
|
4c79b5 |
command, the operating system needs to know where it is, so the
|
|
|
4c79b5 |
operating system uses the @var{PATH} environment variable to look for
|
|
|
4c79b5 |
that command's location. If your system was prepared to use CentOS
|
|
|
4c79b5 |
Artwork Repository correctly (see usage section above), you should
|
|
|
4c79b5 |
have a symbolic link inside @file{~/bin/} directory that points to the
|
|
|
4c79b5 |
@command{centos-art.sh} script file. As @file{~/bin/} directory is, by
|
|
|
4c79b5 |
default, inside @var{PATH} environment variable, the execution of
|
|
|
4c79b5 |
@command{centos-art} command runs the @file{centos-art.sh} script.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
When @command{centos-art.sh} script is executed, the first it does is
|
|
|
4c79b5 |
execute the @file{trunk/Scripts/Bash/initFunctions.sh} file to
|
|
|
4c79b5 |
initialize @command{gettext} variables and all function scripts inside
|
|
|
4c79b5 |
@file{trunk/Scripts/Bash/Functions} directory.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Once @command{gettext} variables and all function scripts have been
|
|
|
4c79b5 |
initialized, the @command{centos-art.sh} script initializes its
|
|
|
4c79b5 |
environment variables using the @command{cli_getVariables} function.
|
|
|
4c79b5 |
At this point the @command{centos-art.sh} script calls the
|
|
|
4c79b5 |
@command{cli_getActions} function from @command{cli_getVariables}
|
|
|
4c79b5 |
function's bottom.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
The @command{cli_getActions} function defines which actions the
|
|
|
4c79b5 |
@command{centos-art.sh} script is able to perform. Inside
|
|
|
4c79b5 |
@command{cli_getActions} function, actions are defined combining
|
|
|
4c79b5 |
positional arguments and function calls.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@float Figure,fig:trunk/Scripts/Bash:Initialization
|
|
|
4c79b5 |
@verbatim
|
|
|
4c79b5 |
+------------------------------------------------------------------+
|
|
|
4c79b5 |
| [centos@host]$ centos-art action 'path/to/dir' --option='value' |
|
|
|
4c79b5 |
+------------------------------------------------------------------+
|
|
|
4c79b5 |
| ~/bin/centos-art --> ~/artwork/trunk/Scripts/Bash/centos-art.sh |
|
|
|
4c79b5 |
+---v-----------------------------------------v--------------------+
|
|
|
4c79b5 |
| centos-art.sh |
|
|
|
4c79b5 |
+---v---------------------------------v---+
|
|
|
4c79b5 |
. | initFunctions.sh | .
|
|
|
4c79b5 |
. +---------------------------------+ .
|
|
|
4c79b5 |
. | cli_getVariables $@ | .
|
|
|
4c79b5 |
. +---v-------------------------v---+ .
|
|
|
4c79b5 |
. . | cli_getActions | . .
|
|
|
4c79b5 |
. . +---v-----------------v---+ . .
|
|
|
4c79b5 |
. . . | function call 1 | . . .
|
|
|
4c79b5 |
. . . | function call 2 | . . .
|
|
|
4c79b5 |
. . . | function call n | . . .
|
|
|
4c79b5 |
. . . +-----------------+ . . .
|
|
|
4c79b5 |
. . ........................... . .
|
|
|
4c79b5 |
. ................................... .
|
|
|
4c79b5 |
...........................................
|
|
|
4c79b5 |
@end verbatim
|
|
|
4c79b5 |
@caption{The @command{centos-art.sh} initialization environment.}
|
|
|
4c79b5 |
@end float
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsubsection The identity matching list
|
|
|
4c79b5 |
|
|
|
4c79b5 |
The identity matching list is used by identity rendering functions to
|
|
|
4c79b5 |
define the relation between translation files and identity design
|
|
|
5fb024 |
templates.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsubsection Adding new features
|
|
|
4c79b5 |
|
|
|
4c79b5 |
To add new features inside @command{centos-art.sh} script, you need to
|
|
|
4c79b5 |
set positional arguments and function calls inside
|
|
|
4c79b5 |
@command{cli_getActions} function for the new function or functions
|
|
|
4c79b5 |
required by the new feature you want to add.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsection Usage
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsubsection The @command{centos-art} @samp{check} action
|
|
|
4c79b5 |
|
|
|
4c79b5 |
This feature is supported through the following command:
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@table @samp
|
|
|
4c79b5 |
@item centos-art check
|
|
|
4c79b5 |
This command verifies paths, symbolic links, installed packages and
|
|
|
4c79b5 |
everything your workstation needs in order to run the
|
|
|
4c79b5 |
@command{centos-art} command correctly.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@quotation
|
|
|
4c79b5 |
@strong{Warning} If this is the first time you run
|
|
|
4c79b5 |
@command{centos-art} command, the appropriate way to execute check
|
|
|
4c79b5 |
action is not using the @command{centos-art} command, but the absolute
|
|
|
4c79b5 |
path to @command{centos-art.sh} script instead:
|
|
|
4c79b5 |
@verbatim
|
|
|
4c79b5 |
~/artwork/trunk/Scripts/Bash/centos-art.sh check
|
|
|
4c79b5 |
@end verbatim
|
|
|
4c79b5 |
@end quotation
|
|
|
4c79b5 |
@end table
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsubsection The @command{centos-art} @samp{search} action
|
|
|
4c79b5 |
|
|
|
4c79b5 |
This feature is not supported yet.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@table @samp
|
|
|
4c79b5 |
@item centos-art search 'pattern'
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Use this command to find directories and files that match exactly the
|
|
|
4c79b5 |
posix-regular expression set in @samp{pattern} as in @samp{^pattern$}.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@item centos-art search 'pattern1 pattern2 patternN'
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Use this command to search repository entries that match pattern1
|
|
|
4c79b5 |
@emph{or} patter2 @emph{or} patternN as in
|
|
|
4c79b5 |
@samp{'^.*(pattern1|pattern2|patternN).*$'}.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@item centos-art search 'path/to/dir1 path/to/dir2 path/to/dirN'
|
|
|
4c79b5 |
|
|
|
4c79b5 |
Use this command to search repository entries that match
|
|
|
4c79b5 |
@samp{path/to/dir1} @emph{or} @samp{path/to/dir2}, @emph{or}
|
|
|
4c79b5 |
@samp{path/to/dirN} as in
|
|
|
4c79b5 |
@samp{^.*(path/to/dir1|path/to/dir2|path/to/dirN).*$'}.
|
|
|
4c79b5 |
@end table
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsubsection The @command{centos-art} @samp{locale-art} action
|
|
|
4c79b5 |
|
|
|
4c79b5 |
This feature is not supported yet.
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@table @samp
|
|
|
4c79b5 |
@item centos-art locale-art 'path/to/dir' --edit
|
|
|
4c79b5 |
@item centos-art locale-art 'path/to/dir' --edit='filename'
|
|
|
4c79b5 |
@item centos-art locale-art 'path/to/dir' --list
|
|
|
4c79b5 |
@item centos-art locale-art 'path/to/dir' --list='filename'
|
|
|
4c79b5 |
@end table
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsubsection The @command{centos-art} @samp{license} action
|
|
|
4c79b5 |
|
|
|
4c79b5 |
This feature is supported through the following command:
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@table @samp
|
|
|
4c79b5 |
@item centos-art license
|
|
|
4c79b5 |
Use this command to see a brief description of @command{centos-art}
|
|
|
4c79b5 |
command its copyright and its license notes.
|
|
|
4c79b5 |
@end table
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@subsection See also
|
|
|
4c79b5 |
|
|
|
4c79b5 |
@menu
|
|
|
4c79b5 |
* trunk Scripts Bash Functions::
|
|
|
4c79b5 |
* trunk Scripts Bash Locale::
|
|
|
4c79b5 |
* trunk Scripts::
|
|
|
4c79b5 |
@end menu
|