Execution Environment Reference The execution environment of centos-art.sh script can be defined as the virtual boundery of memory in which the script does what it was conceived to do once executed by a command-line interpreter (e.g., Bash). When you execute the centos-art.sh script in your terminal, the interpreter behind it creates a new execution environment for it which inherits all the variables and functions set in the shell execution environment and those exported to it through the ~/.bash_profile file, as well. The centos-art.sh script uses the ~/.bash_profile file to implement per-user customizations. For example, you can use this file to set the location of your working copy through the TCAR_WORKDIR enviroment variable. By default this variable is set to ${HOME}/artwork, but you can reset to something different to fit your needs. See . 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 centos-art.sh script is developed in. Execution environments Execution environments --------------------------------------------------------------- Shell execution environment ----|-------------------|-----------------|-------------------- . |-- TCAR_WORKDIR |-- TCAR_BRAND |-- EDITOR . . |-- LANG |-- HOME |-- PATH . . `-- centos-art.sh `-- ... `-- ... . . ----|------------------------------------------------ . . centos-art.sh script execution environment . . ----|--------------------|--------------------------- . . . |-- CLI_NAME `-- cli() . . . . |-- CLI_VERSION |-- render() . . . . |-- CLI_BASEDIR | |-- svg() . . . . |-- CLI_FUNCDIR | `-- docbook() . . . . |-- TMPDIR |-- help() . . . . `-- ... | |-- docbook() . . . . | `-- texinfo() . . . . |-- locale() . . . . |-- cli_printMessage() . . . . |-- cli_getFilesList() . . . . `-- ... . . . ..................................................... . ............................................................... The first file 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. 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 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. In , render, help and locale are all specific functions while cli_printMessage and cli_getFilesList are common functionalities.