From 3666ca74dcd1c6f05093f29b0b7a062758537a81 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 04 2012 02:09:04 +0000 Subject: Update `Scripts/Bash/funref.docbook' file. --- diff --git a/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/funref.docbook b/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/funref.docbook index 8aec14a..624b21d 100644 --- a/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/funref.docbook +++ b/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/funref.docbook @@ -681,12 +681,239 @@ splash.svgz = "Symbols/48/=\BRAND=.png:x48+30+20" cli_getConfigValue + FILE + SECTION + OPTION - ... + The cli_getConfigValue function + standardizes the way option values are retrieved from + configuration files. As convention, + cli_getConfigValue uses the output + produced by cli_getConfigLines as input + to retrieve the option values. As convention, in + option = "value" lines, the values + retrieved are always on the right side. The values retrieved + are also output without quotation and translation markers + already expanded. + + + + The cli_getConfigValue function accepts + the following arguments: + + + + + FILE + + + This argument specifies the absolute path to the configuration + file you want to retrieve the value from. For example, + ${TCAR_WORKDIR}/trunk/Identity/Models/Themes/Default/Distro/5/Anaconda/branding.conf. + + + + + + SECTION + + + This argument specifies the name of the section related to the + configuration line you want to retrieve the value from. For + example, symbols without brackets. + + + + + + OPTION + + + This argument specifies the name of the option you want to + retrieve the value from. For example, in , the + anaconda_header.svgz option will output the + Symbols/48/=\BRAND=.png:x48+732+20 value + without quotation and translation markers expanded. So if the + value of TCAR_BRAND environment variable is + centos, the real value you + get will be + Symbols/48/centos.png:x48+732+20. + + + + + + + Use the cli_getConfigValue function + whenever you want to retrieve values from configuration files + in a controlled way. + + + + See also: + + + + + + + + + cli_getFilesList + --pattern + --mindepth + --maxdepth + --type + --uid + LOCATION + + + + + The cli_getFilesList standardizes the way + list of files are built inside the + centos-art.sh script. This function outputs + a sorted and unique list of files based on the options and + location provided as argument. This function is an interface + to the find command. Don't use + find command directly inside the + centos-art.sh script. Instead, use the + cli_getFilesList function. + + The cli_getFilesList accepts the + following arguments: + + + + + LOCATION + + + This arguments must be the absolute path to a directory and + specifies where the search of files in any form (e.g., + directories, links, etc.) will take place in. If + LOCATION isn't a directory, the + script finishes its execution with an error message. + + + + + + + The cli_getFilesList accepts the + following options: + + + + + + + + This option specifies a posix-egrep type regular expression as + value. This regular expression is applied to path specified in + LOCATION argument. Only file paths + that match this regular expression inside + LOCATION directory will be included + in the final list of files. By default, if this option is not + provided, the + ^/.*[[:alnum:]_/-]+$ regular + expression is used. + + + When you use the cli_getFilesList you + don't need to specified the absolute path of files you want to + look for. This is something + cli_getFilesList already does for you. + When you use this function, the value you pass as regular + expression isn't the final regular expression used. Instead, + the regular expression you pass is used to build the final + regular expression passed to find command. + The final regular expression passed to find is + ^/.*${PATTERN}$, where + ${PATTERN} is the value you passed to + option as + REGEX. + + + + + + + + This option specifies the minimal + NUMBER of levels deep the search + should go under the directory + LOCATION specified. For example, if + you specify the search will + start two levels deep considering the path provided as + reference. + + + + + + + + This option specifies the maximum + NUMBER of levels deep the search + should go under the directory + LOCATION specified. For example, if + you specify the search will + begin in the very same directory path you provided as + LOCATION and stop two levels deep + using it as reference. + + + + + + + + This option specifies the type of files being searched. This + option accepts the same values the find + option does. However, the following + STRING values are the most used + inside the script so far: + + + + + + d — directory. + + + + + f — regular file. + + + + + + + + + + + + This option specifies the numeric user id of the files you + want to search. Only files that match this numeric user id + will be added to the final list of files. + + + + + + + Use the cli_getFilesList whenever you + need to build list of files for further processing. + +