From 58112f5d5df8f8a3e6a3091f13ba0b1949a357a1 Mon Sep 17 00:00:00 2001
From: Alain Reguera Delgado Functions scripts stored directly under
+ Function scripts stored directly under
`trunk/Scripts/Bash/Functions/' directory are used to define
-global functions. Global function can be used inside action specific
+global functions. Global functions can be used inside action specific
functionalities and or even be reused inside themselves. This section
provides introductory information to global functions you can use
inside `centos-art.sh' script.
@@ -596,11 +596,33 @@ inside `centos-art.sh' script.
Validate action value (ACTIONVAL) variable.
The action value variable can take one of the following values:
+ If another value different from that specified above is passed to
+action value variable, the `centos-art.sh' script prints an error
+message and ends script execution. Notice that when you provide a URL
+there is no verification in order to determine the directory or file
+you refered on it is valid or not. That verification is done by the
+command that receives the location inside the functionality. The only
+verification `centos-art.sh' script makes with URL is granting
+that they begin with `https://projects.centos.org/svn/artwork'.
+ 3.37.3.2 Global functions
-
+
+
+cli_checkActionArguments
is called from
-cli_getActionArguments
function. Probably, there is not other
-use for cli_checkActionArguments
but to be called from
+cli_getActionArguments
function and, probably, there is not
+other use for cli_checkActionArguments
but to be called from
cli_getActionArguments
function.
-
Update cli_checkActionArguments
function if you need to improve
+action value (ACTIONVAL) variable input validation.
+
Redefines arguments (ARGUMENTS) global variable using +
Redefine arguments (ARGUMENTS) global variable using
getopt
command output. For more information about how to use
cli_doParseArguments
function, see ARGUMENTS variable
description above.
@@ -744,30 +766,31 @@ function, and occasionally, farther redefined (by
variables, using positional parameters passed in $@ variable.
The cli_getActionsArguments
function is called from
-cli.sh
function script. The cli_getActionsArguments
-function is call from cli.sh
function script using cli
-function positional parameters (i.e., the positional parameters passed
-as arguments in the command-line) as first function argument.
+cli.sh
function script, using cli
function's positional
+parameters (i.e., the positional parameters passed as arguments in the
+command-line) as first function argument.
Once command-line positional parameters are accesible,
-cli-getActionsArguments
uses regular expression to retrive
+
Once command-line positional parameters are accesible to
+`centos-art.sh' script execution evironment,
+cli_getActionsArguments
uses regular expression to retrive
action variables from first and second argument. The first argument
-defines the value use as function name (FUNCNAM), and the second
-argument defines the value used as action name (ACTIONNAM) and
-action value (ACTIONVAL), respectively.
+defines the value used as function name (FUNCNAM), and the
+second argument defines both values used as action name
+(ACTIONNAM) and action value (ACTIONVAL), respectively.
The first argument is a word in lower case. This word specifies the name of the functionality you want to use (e.g., `render' to -rener images, `manual' to work on documentation, and so on.) +render images, `manual' to work on documentation, and so on.)
The second argument has a long option style (e.g., `--option=value'). The `--option' represents the action name -(ACTIONNAM), and the characters after the equal sign (`='), -and before the first space character, are considered as the action +(ACTIONNAM), and the characters inbetween the equal sign +(`=') and the first space character, are considered as the action value (ACTIONVAL). In order to provide action values with space -characters you need to enclose it with quotes like in -`--option='This is long value''. Generally, action values are -used to specify paths over which the action name acts on. +characters inbetween you need to enclose action value with quotes like +in `--option='This is long value with spaces inbetween''. +Generally, action values are used to specify paths over which the +action name acts on.
Once action related variables (i.e., FUNCNAM, ACTIONNAM, and ACTIONVAL) are defined and validated, diff --git a/Manuals/en/Info/Repository/repository.info.bz2 b/Manuals/en/Info/Repository/repository.info.bz2 index 3dc3674..0b5bce9 100644 Binary files a/Manuals/en/Info/Repository/repository.info.bz2 and b/Manuals/en/Info/Repository/repository.info.bz2 differ diff --git a/Manuals/en/Plaintext/Repository/repository.txt b/Manuals/en/Plaintext/Repository/repository.txt index bb02358..bea82e4 100644 --- a/Manuals/en/Plaintext/Repository/repository.txt +++ b/Manuals/en/Plaintext/Repository/repository.txt @@ -3236,8 +3236,8 @@ for you to use inside specific functions: 3.37.3.2 Global functions ......................... -Functions scripts stored directly under `trunk/Scripts/Bash/Functions/' -directory are used to define global functions. Global function can be +Function scripts stored directly under `trunk/Scripts/Bash/Functions/' +directory are used to define global functions. Global functions can be used inside action specific functionalities and or even be reused inside themselves. This section provides introductory information to global functions you can use inside `centos-art.sh' script. @@ -3245,11 +3245,35 @@ global functions you can use inside `centos-art.sh' script. -- Function: cli_checkActionArguments Validate action value (ACTIONVAL) variable. + The action value variable can take one of the following values: + + 1. Path to one directory inside the local working copy, + + 2. Path to one file inside the local working copy, + + 3. URL to one directory inside the remote central repository, + + 4. URL to one file inside the remote central repository. + + If another value different from that specified above is passed to + action value variable, the `centos-art.sh' script prints an error + message and ends script execution. Notice that when you provide a + URL there is no verification in order to determine the directory + or file you refered on it is valid or not. That verification is + done by the command that receives the location inside the + functionality. The only verification `centos-art.sh' script makes + with URL is granting that they begin with + `https://projects.centos.org/svn/artwork'. + `cli_checkActionArguments' is called from `cli_getActionArguments' - function. Probably, there is not other use for + function and, probably, there is not other use for `cli_checkActionArguments' but to be called from `cli_getActionArguments' function. + Update `cli_checkActionArguments' function if you need to improve + action value (ACTIONVAL) variable input validation. + + -- Function: cli_checkFiles FILE [TYPE] Verify file existence. @@ -3336,7 +3360,7 @@ global functions you can use inside `centos-art.sh' script. working copy as you may need to. -- Function: cli_doParseArguments - Redefines arguments (ARGUMENTS) global variable using `getopt' + Redefine arguments (ARGUMENTS) global variable using `getopt' command output. For more information about how to use `cli_doParseArguments' function, see ARGUMENTS variable description above. @@ -3367,30 +3391,31 @@ global functions you can use inside `centos-art.sh' script. parameters passed in $@ variable. The `cli_getActionsArguments' function is called from `cli.sh' - function script. The `cli_getActionsArguments' function is call - from `cli.sh' function script using `cli' function positional - parameters (i.e., the positional parameters passed as arguments in - the command-line) as first function argument. + function script, using `cli' function's positional parameters + (i.e., the positional parameters passed as arguments in the + command-line) as first function argument. - Once command-line positional parameters are accesible, - `cli-getActionsArguments' uses regular expression to retrive + Once command-line positional parameters are accesible to + `centos-art.sh' script execution evironment, + `cli_getActionsArguments' uses regular expression to retrive action variables from first and second argument. The first argument - defines the value use as function name (FUNCNAM), and the second - argument defines the value used as action name (ACTIONNAM) and + defines the value used as function name (FUNCNAM), and the second + argument defines both values used as action name (ACTIONNAM) and action value (ACTIONVAL), respectively. The first argument is a word in lower case. This word specifies the - name of the functionality you want to use (e.g., `render' to rener - images, `manual' to work on documentation, and so on.) + name of the functionality you want to use (e.g., `render' to + render images, `manual' to work on documentation, and so on.) The second argument has a long option style (e.g., `--option=value'). The `--option' represents the action name - (ACTIONNAM), and the characters after the equal sign (`='), and - before the first space character, are considered as the action - value (ACTIONVAL). In order to provide action values with space - characters you need to enclose it with quotes like in - `--option='This is long value''. Generally, action values are used - to specify paths over which the action name acts on. + (ACTIONNAM), and the characters inbetween the equal sign (`=') and + the first space character, are considered as the action value + (ACTIONVAL). In order to provide action values with space + characters inbetween you need to enclose action value with quotes + like in `--option='This is long value with spaces inbetween''. + Generally, action values are used to specify paths over which the + action name acts on. Once action related variables (i.e., FUNCNAM, ACTIONNAM, and ACTIONVAL) are defined and validated, `cli_getActionsArguments' @@ -6128,24 +6153,24 @@ Index ***** branches: See 1. (line 390) -Common translation files: See 3.50.2.5. (line 5557) -How to render brands' translation files: See 3.52.3. (line 5861) -How to render fonts' translation files: See 3.54.3. (line 5934) -How to render translation files: See 3.50.3. (line 5727) -Metadata maintainance: See 3.45.2. (line 4701) -Specific translation files: See 3.50.2.6. (line 5582) +Common translation files: See 3.50.2.5. (line 5582) +How to render brands' translation files: See 3.52.3. (line 5886) +How to render fonts' translation files: See 3.54.3. (line 5959) +How to render translation files: See 3.50.3. (line 5752) +Metadata maintainance: See 3.45.2. (line 4726) +Specific translation files: See 3.50.2.6. (line 5607) tags: See 2. (line 393) -Template translation files: See 3.50.2.4. (line 5387) -Translation brands file names: See 3.52.2.1. (line 5818) -Translation configuration scripts: See 3.50.2.8. (line 5616) -Translation entries: See 3.50.2.1. (line 5203) -Translation files: See 3.50.2.3. (line 5319) -Translation markers: See 3.50.2.2. (line 5284) -Translation paths: See 3.50.2.1. (line 5203) +Template translation files: See 3.50.2.4. (line 5412) +Translation brands file names: See 3.52.2.1. (line 5843) +Translation configuration scripts: See 3.50.2.8. (line 5641) +Translation entries: See 3.50.2.1. (line 5228) +Translation files: See 3.50.2.3. (line 5344) +Translation markers: See 3.50.2.2. (line 5309) +Translation paths: See 3.50.2.1. (line 5228) Translation pre-rendering configuration scripts:See 3.50.2.8. - (line 5616) -Translation rendering: See 3.50.2.7. (line 5605) -Translation rendering default functionality: See 3.50.2.9. (line 5702) + (line 5641) +Translation rendering: See 3.50.2.7. (line 5630) +Translation rendering default functionality: See 3.50.2.9. (line 5727) trunk: See 3. (line 396) trunk Identity: See 3.1. (line 399) trunk Identity Brands: See 3.2. (line 819) @@ -6190,31 +6215,31 @@ trunk Manuals: See 3.34. (line 2579) trunk Scripts: See 3.35. (line 2633) trunk Scripts Bash: See 3.36. (line 2657) trunk Scripts Bash Functions: See 3.37. (line 2769) -trunk Scripts Bash Functions Html: See 3.38. (line 3792) -trunk Scripts Bash Functions Locale: See 3.39. (line 3813) -trunk Scripts Bash Functions Manual: See 3.40. (line 3893) -trunk Scripts Bash Functions Path: See 3.41. (line 3914) -trunk Scripts Bash Functions Render: See 3.42. (line 4316) -trunk Scripts Bash Functions Render Config: See 3.43. (line 4337) -trunk Scripts Bash Functions Shell: See 3.44. (line 4515) -trunk Scripts Bash Functions Svg: See 3.45. (line 4683) -trunk Scripts Bash Functions Verify: See 3.46. (line 4871) -trunk Scripts Bash Locale: See 3.47. (line 5087) -trunk Scripts Perl: See 3.48. (line 5116) -trunk Scripts Python: See 3.49. (line 5133) -trunk Translations: See 3.50. (line 5154) -trunk Translations Identity: See 3.51. (line 5756) -trunk Translations Identity Brands: See 3.52. (line 5777) -trunk Translations Identity Brands Tpl: See 3.53. (line 5872) -trunk Translations Identity Fonts: See 3.54. (line 5887) -trunk Translations Identity Models: See 3.55. (line 5950) -trunk Translations Identity Release: See 3.56. (line 5965) -trunk Translations Identity Themes: See 3.57. (line 5980) -trunk Translations Identity Themes Backgrounds:See 3.58. (line 5995) +trunk Scripts Bash Functions Html: See 3.38. (line 3817) +trunk Scripts Bash Functions Locale: See 3.39. (line 3838) +trunk Scripts Bash Functions Manual: See 3.40. (line 3918) +trunk Scripts Bash Functions Path: See 3.41. (line 3939) +trunk Scripts Bash Functions Render: See 3.42. (line 4341) +trunk Scripts Bash Functions Render Config: See 3.43. (line 4362) +trunk Scripts Bash Functions Shell: See 3.44. (line 4540) +trunk Scripts Bash Functions Svg: See 3.45. (line 4708) +trunk Scripts Bash Functions Verify: See 3.46. (line 4896) +trunk Scripts Bash Locale: See 3.47. (line 5112) +trunk Scripts Perl: See 3.48. (line 5141) +trunk Scripts Python: See 3.49. (line 5158) +trunk Translations: See 3.50. (line 5179) +trunk Translations Identity: See 3.51. (line 5781) +trunk Translations Identity Brands: See 3.52. (line 5802) +trunk Translations Identity Brands Tpl: See 3.53. (line 5897) +trunk Translations Identity Fonts: See 3.54. (line 5912) +trunk Translations Identity Models: See 3.55. (line 5975) +trunk Translations Identity Release: See 3.56. (line 5990) +trunk Translations Identity Themes: See 3.57. (line 6005) +trunk Translations Identity Themes Backgrounds:See 3.58. (line 6020) trunk Translations Identity Themes Distro Anaconda Progress:See 3.59. - (line 6016) -trunk Translations Identity Widgets: See 3.60. (line 6109) -Unused definitions: See 3.45.2.1. (line 4808) + (line 6041) +trunk Translations Identity Widgets: See 3.60. (line 6134) +Unused definitions: See 3.45.2.1. (line 4833) List of Figures *************** diff --git a/Manuals/en/Texinfo/Repository/trunk/Scripts/Bash/Functions.texi b/Manuals/en/Texinfo/Repository/trunk/Scripts/Bash/Functions.texi index 3b0802a..2ece8ba 100644 --- a/Manuals/en/Texinfo/Repository/trunk/Scripts/Bash/Functions.texi +++ b/Manuals/en/Texinfo/Repository/trunk/Scripts/Bash/Functions.texi @@ -499,9 +499,9 @@ If no one of these values is set in @env{EDITOR} environment variable, @subsubsection Global functions -Functions scripts stored directly under +Function scripts stored directly under @file{trunk/Scripts/Bash/Functions/} directory are used to define -global functions. Global function can be used inside action specific +global functions. Global functions can be used inside action specific functionalities and or even be reused inside themselves. This section provides introductory information to global functions you can use inside @file{centos-art.sh} script. @@ -509,10 +509,32 @@ inside @file{centos-art.sh} script. @defun cli_checkActionArguments Validate action value (@var{ACTIONVAL}) variable. +The action value variable can take one of the following values: + +@enumerate +@item Path to one directory inside the local working copy, +@item Path to one file inside the local working copy, +@item URL to one directory inside the remote central repository, +@item URL to one file inside the remote central repository. +@end enumerate + +If another value different from that specified above is passed to +action value variable, the @file{centos-art.sh} script prints an error +message and ends script execution. Notice that when you provide a URL +there is no verification in order to determine the directory or file +you refered on it is valid or not. That verification is done by the +command that receives the location inside the functionality. The only +verification @file{centos-art.sh} script makes with URL is granting +that they begin with @samp{https://projects.centos.org/svn/artwork}. + @code{cli_checkActionArguments} is called from -@code{cli_getActionArguments} function. Probably, there is not other -use for @code{cli_checkActionArguments} but to be called from +@code{cli_getActionArguments} function and, probably, there is not +other use for @code{cli_checkActionArguments} but to be called from @code{cli_getActionArguments} function. + +Update @code{cli_checkActionArguments} function if you need to improve +action value (@var{ACTIONVAL}) variable input validation. + @end defun @defun cli_checkFiles FILE [TYPE] @@ -605,7 +627,7 @@ copy as you may need to. @end defun @defun cli_doParseArguments -Redefines arguments (@var{ARGUMENTS}) global variable using +Redefine arguments (@var{ARGUMENTS}) global variable using @command{getopt} command output. For more information about how to use @code{cli_doParseArguments} function, see @var{ARGUMENTS} variable description above. @@ -639,30 +661,31 @@ Initialize function name (@var{FUNCNAM}), action name variables, using positional parameters passed in @var{$@@} variable. The @code{cli_getActionsArguments} function is called from -@code{cli.sh} function script. The @code{cli_getActionsArguments} -function is call from @code{cli.sh} function script using @code{cli} -function positional parameters (i.e., the positional parameters passed -as arguments in the command-line) as first function argument. +@code{cli.sh} function script, using @code{cli} function's positional +parameters (i.e., the positional parameters passed as arguments in the +command-line) as first function argument. -Once command-line positional parameters are accesible, -@code{cli-getActionsArguments} uses regular expression to retrive +Once command-line positional parameters are accesible to +@file{centos-art.sh} script execution evironment, +@code{cli_getActionsArguments} uses regular expression to retrive action variables from first and second argument. The first argument -defines the value use as function name (@var{FUNCNAM}), and the second -argument defines the value used as action name (@var{ACTIONNAM}) and -action value (@var{ACTIONVAL}), respectively. +defines the value used as function name (@var{FUNCNAM}), and the +second argument defines both values used as action name +(@var{ACTIONNAM}) and action value (@var{ACTIONVAL}), respectively. The first argument is a word in lower case. This word specifies the name of the functionality you want to use (e.g., @samp{render} to -rener images, @samp{manual} to work on documentation, and so on.) +render images, @samp{manual} to work on documentation, and so on.) The second argument has a long option style (e.g., @samp{--option=value}). The @samp{--option} represents the action name -(@var{ACTIONNAM}), and the characters after the equal sign (@samp{=}), -and before the first space character, are considered as the action +(@var{ACTIONNAM}), and the characters inbetween the equal sign +(@samp{=}) and the first space character, are considered as the action value (@var{ACTIONVAL}). In order to provide action values with space -characters you need to enclose it with quotes like in -@samp{--option='This is long value'}. Generally, action values are -used to specify paths over which the action name acts on. +characters inbetween you need to enclose action value with quotes like +in @samp{--option='This is long value with spaces inbetween'}. +Generally, action values are used to specify paths over which the +action name acts on. Once action related variables (i.e., @var{FUNCNAM}, @var{ACTIONNAM}, and @var{ACTIONVAL}) are defined and validated,