|
|
4c9448 |
@node Scripts Functions
|
|
|
266676 |
@section @file{Scripts/Functions}
|
|
|
4c9448 |
@cindex Scripts functions
|
|
|
0dc09e |
|
|
|
4c9448 |
The @file{Scripts/Functions} directory exists to organize common and
|
|
|
4c9448 |
specific functionalities related to the @command{centos-art.sh}
|
|
|
0dc09e |
script. Common functionalities are loaded once the
|
|
|
0dc09e |
@command{centos-art.sh} script is executed and made available for
|
|
|
4c9448 |
specific functionalities to reuse.
|
|
|
0dc09e |
|
|
|
4c9448 |
The @file{Scripts/Functions} directory and all files inside it
|
|
|
0dc09e |
are under version control.
|
|
|
0dc09e |
|
|
|
4c9448 |
Content rendition inside `Scripts/Functions' directory is not
|
|
|
0dc09e |
supported.
|
|
|
0dc09e |
|
|
|
4c9448 |
Inside @file{Scripts/Functions} directory, specific
|
|
|
0dc09e |
functionalities are organized in the following directories:
|
|
|
0dc09e |
|
|
|
0dc09e |
@c -- <[centos-art(SeeAlso)
|
|
|
0dc09e |
@itemize
|
|
|
0dc09e |
@end itemize
|
|
|
0dc09e |
@c -- ]>
|
|
|
0dc09e |
|
|
|
4c9448 |
Inside @file{Scripts/Functions} directory, common
|
|
|
0dc09e |
functionalities are stored in files prefixed with the @samp{cli}
|
|
|
0dc09e |
string as described below:
|
|
|
0dc09e |
|
|
|
0dc09e |
@defun cli "$@@"
|
|
|
0dc09e |
The @code{cli} functionality initializes the command-line interface
|
|
|
0dc09e |
(cli) of @command{centos-art.sh} script. This function evaluates the
|
|
|
0dc09e |
first argument provided to @command{centos-art.sh} script and call the
|
|
|
035705 |
specific functionality that responds to it. The @code{cli} function
|
|
|
0dc09e |
is directly called from @file{centos-art.sh} itself once global
|
|
|
0dc09e |
variables are defined, working copy verification performed, common
|
|
|
0dc09e |
functionalities exported into the execution environment, and signals
|
|
|
0dc09e |
trapped. The @code{cli} function receives all positional parameters
|
|
|
0dc09e |
passed to @command{centos-art.sh} as argument.
|
|
|
0dc09e |
|
|
|
0dc09e |
The @code{cli} function creates the a new environment inside that one
|
|
|
0dc09e |
created by @command{centos-art.sh} script execution. Variables defined
|
|
|
0dc09e |
herein will be avaialble to all specific functionalities and common
|
|
|
0dc09e |
functionalities used inside specific functionalities.
|
|
|
0dc09e |
|
|
|
0dc09e |
@defvar FUNCNAM
|
|
|
0dc09e |
The @var{FUNCNAM} variable stores the function name passed as first
|
|
|
0dc09e |
argument to @command{centos-art.sh} script using the file convenction
|
|
|
0dc09e |
specified by @code{cli_getRepoName} function.
|
|
|
0dc09e |
@end defvar
|
|
|
0dc09e |
|
|
|
0dc09e |
@defvar FUNCDIR
|
|
|
0dc09e |
The @var{FUNCDIR} variable stores the absolute path of directory
|
|
|
0dc09e |
holding @command{centos-art.sh} script functions, both common and
|
|
|
0dc09e |
specific.
|
|
|
0dc09e |
@end defvar
|
|
|
0dc09e |
|
|
|
0dc09e |
@defvar FUNCDIRNAM
|
|
|
0dc09e |
...
|
|
|
0dc09e |
@end defvar
|
|
|
0dc09e |
|
|
|
0dc09e |
@defvar FUNCSCRIPT
|
|
|
0dc09e |
...
|
|
|
0dc09e |
@end defvar
|
|
|
0dc09e |
|
|
|
0dc09e |
@defvar ARGUMENTS
|
|
|
0dc09e |
...
|
|
|
0dc09e |
@end defvar
|
|
|
0dc09e |
@end defun
|