diff --git a/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/environment.docbook b/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/environment.docbook index 015e741..3cf14aa 100644 --- a/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/environment.docbook +++ b/Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/environment.docbook @@ -1,4 +1,4 @@ - +
Execution Environment Reference @@ -31,17 +31,18 @@ Once the centos-art.sh script has been executed, it creates different levels of execution environments inside the one created by the script itself on - the shell. This different levels can be seen as a tree of - execution environments which inherit one another, as - illustrated in . - These different levels of execution evironments are where the + the shell. These different environment levels can be seen as + a tree of execution environments which inherit one another, as + illustrated in . These + different levels of execution evironments are where the centos-art.sh script is developed in. - - Execution environments + + The execution environment - Execution environments + The execution environment @@ -74,46 +75,339 @@ Shell execution environment - The first file centos-art.sh script calls - is the + The first file the centos-art.sh script + calls is the trunk/Scripts/Bash/Functions/Common/cli.sh - file. This file initializes variables and functions used along - the script execution environment. Such variables are for - internal use inside the centos-art.sh - script only and users shouldn't modify them to customize the - script in a per-user level. Instead, to customize the script - behaviour in a per-user level, users need to make use of - environment variables set in - ~/.bash_profile file. + file. This file initializes variables and functions can be + used along the script execution environment lifetime. Such + environment variables are for internal use inside the + centos-art.sh script only and users + shouldn't modify them to customize the script in a per-user + level. Instead, to customize the script behaviour in a + per-user level, users need to make use of environment + variables set in ~/.bash_profile file. +
+ + Environment Variables + - The functions initialized by - trunk/Scripts/Bash/Functions/Common/cli.sh - can be either common or specific. Common functionalities are - always loaded in each execution of centos-art.sh script. - Common functionalities are stored in the trunk/Scripts/Bash/Functions/Commons/ - directory and are made available for all specific - functionalities loaded later. Specific functionalities, on the - other hand, are loaded based in the first argument passed to - centos-art.sh script and are not available - for common functionalities. Specific functionalities are + The centos-art.sh script uses the following + system environment variables: + + + + + PATH + + + The PATH environment variable is specific to + the operating system and provides search paths for command + execution. By default, the centos-art.sh script links + executable scripts from the ~/bin directory which is one of + the locations used as search path in this variable. This is + how we create the centos-art command from + the centos-art.sh script inside your + working copy. + + + + This variable is not initialized inside the + centos-art.sh script. Instead, the value + set in ~/.bash_profile file is used. + + + + + + + EDITOR + + + The EDITOR environment variable is specific to + the operating system and provides the path to your default + text editor. The centos-art.sh script uses + the default text editor to edit subversion pre-commit + messages, translation files, documentation files, script + files, and similar text-based files. + + + + Possible values for this variable are: + + + + + + /usr/bin/vim + + + + + + /usr/bin/emacs + + + + + + /usr/bin/nano + + + + + + In case none of these values is set for the + EDITOR environment variable inside + ~/.bash_profile, the + centos-art.sh script uses /usr/bin/vim as default text + editor. This is the default text editor installed by default + in &TCD;. + + + + + + TEXTDOMAIN + + + The TEXTDOMAIN environment variable is specific + to the operating system and provides the domain name of that + application we are producing translation messages for. This + variable, in combination with TEXTDOMAINDIR, is + used by gettext to find out the + location of translation messages. In the very specific case + of centos-art.sh script we use the + centos-art.sh name as domain name. + + + + This variable is initialized inside the + centos-art.sh script, so if you set it + outside it (e.g., in ~/.bash_profile) the + value you set there will be overwritten by that one set inside + centos-art.sh script, once it is executed. + + + + + + TEXTDOMAINDIR + + + The TEXTDOMAINDIR environment variable is + specific to the operating system and provides the absolute + path to the directory containing the translation messages + related to that application specified by + TEXTDOMAIN environment variable. In the very + specific case of centos-art.sh script we + use the trunk/Locales/Scripts/Bash + path as default value. + + + This variable is initialized inside the + centos-art.sh script, so if you set it + outside it (e.g., in ~/.bash_profile) the + value you set there will be overwritten by that one set inside + centos-art.sh script, once it is executed. + + + + + + TMPDIR + + + The TMPDIR environment variable is specific to + the operating system and provides the absolute path to the + temporal directory the centos-art.sh script will use along its + execution. This variable is defined inside the + centos-art.sh script itself using the + mktemp command and will be unique on each + script execution. Thus, you should be able to run several + instances of centos-art.sh script + simultaneously without any problem. + + + + Each time you need to store temporal files, do it inside the + absolute path specified by this variable. + + + + This variable is initialized inside the + centos-art.sh script, so if you set it + outside it (e.g., in ~/.bash_profile) the + value you set there will be overwritten by that one set inside + centos-art.sh script, once it is executed. + + + + + + LANG + + + The LANG environment variable is specific to + the operating system and controls the default locale + information of it. The centos-art.sh + script use the LANG environment variable to + determine what language to use for printing output messages + from the script itself, as well as the portable objects + locations that need to be updated or edited when you localize + directory structures inside the working copy of &TCAR;. + + + + The LANG environment variable is initially set + in the installation process of &TCD;, specifically in the + Language step. Generally, there is no + need to customize this variable in your personal profile. If + you need to change the value of this environment variable do + it through the login screen of GNOME Desktop Environment or + the system-config-language command, or even + resetting the variable before executing the + centos-art.sh script. + + + + + + + + In addition to system environment variables described above, + the centos-art.sh script adds the following + variables inside the ~/.bash_profile file + to control the script behaviour in a per-user level: + + + + + TCAR_WORKDIR + + + The TCAR_WORKDIR environment variable is + specific to centos-art.sh script and + controls the working copy default location in the workstation. + This variable doesn't exist just after installing your + workstation. In order for this variable to be customizable you + need to configure your workstation first, as described in + . + + + By default, when this variable is not set, the + centos-art.sh script assumes the ${HOME}/artwork path as default + location for your working copy. + + + + + + TCAR_BRAND + + + The TCAR_BRAND environment variable is specific + to centos-art.sh script and controls the + brand information that identifies the content produced inside + &TCAR;. The brand information is used to give name to some + files inside the repository (e.g., see files under trunk/Identity/Models/Brands + directory). + + + By default, this variable takes centos as + value. In case you want to change it to something else, you + should consider the following implications: + + + + + The centos-art.sh script will no longer be + referred as such. Instead, the + ${TCAR_BRAND}-art.sh name will be used. + This implies that you no longer are using the + centos-art.sh file we provide as part of + &TCAR; and won't be able to commit changes to it. However, if + you retain the same logic from + centos-art.sh script in + ${TCAR_WORKDIR}-art.sh, you can use + common and specific functionalities provided by + centos-art.sh script and commit changes to + them. + + + + + The files stored under trunk/Identity/Models/Brands + should be named using the value of + ${TCAR_BRAND} as section. If you change + the value of this variable, you need to be sure the new value + set does coincide with the file names you use to store brand + information. + + + + + + + +
+ +
+ + Environment Functions + + + Once environment variables are initialized, the + centos-art.sh script initializes common and + specific environment functions. + + + + Common environment functions are stored under trunk/Scripts/Bash/Functions/Commons + directory and will be available always, both for common + environment functions themselves and specific environment + functions. + + + + Specific environment functionalities, on the other hand, are stored in the trunk/Scripts/Bash/Functions/${CLI_FUNCDIRNAM}/${CLI_FUNCNAME}.sh - file where CLI_FUNCDIRNAM is the function - name with the first letter in upper case and - CLI_FUNCNAME is the function name with all - letters in lower case. + file, where CLI_FUNCDIRNAME is the first + argument passed to centos-art.sh script with the first letter + in uppercase but the rest in lowercase and + CLI_FUNCNAME is the first argument passed + to centos-art.sh script with all letters in lowercase. + Specific functionalities are exported after common + functionalities, so specific environment functionalities + aren't available inside common environment functionalities. - In , + In , render, help and - locale are all specific functions while - cli_printMessage and - cli_getFilesList are common - functionalities. + locale are all specific environment + functions while cli_printMessage and + cli_getFilesList are common environment + functions. - + + Both specific and common environment functions exist to + standardize frequent tasks inside &TCAR;. The following + sections will describe which these frequent tasks are and the + way they are standardized using specific and common + environment functions. + + +
+ +