Blame Automation/Manuals/tcar_setModuleEnvironment.sh.asciidoc

Alain Reguera Delgado 06ab0f
tcar_setModuleEnvironment.sh(1)
Alain Reguera Delgado 06ab0f
===============================
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
Name
Alain Reguera Delgado 06ab0f
----
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
tcar_setModuleEnvironment.sh - Initiate module environments.
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
Synopsis
Alain Reguera Delgado 06ab0f
--------
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado e36b89
*tcar_setModuleEnvironment [-m "MODULE_NAME"] [-t "MODULE_TYPE"] [-g MODULE_ARGUMENT] ...*
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
Description
Alain Reguera Delgado 06ab0f
-----------
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado e36b89
[[options]]
Alain Reguera Delgado 06ab0f
Options
Alain Reguera Delgado 06ab0f
-------
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado e36b89
The *tcar_setModuleEnvironment* function accepts the following
Alain Reguera Delgado e36b89
options:
Alain Reguera Delgado e36b89
Alain Reguera Delgado e36b89
-m ::
Alain Reguera Delgado e36b89
    This option specifies the name of the module you want to load.
Alain Reguera Delgado e36b89
-t::
Alain Reguera Delgado e36b89
    This option specifies the type of the module you want to load.
Alain Reguera Delgado e36b89
    Modules can be one of the following types:
Alain Reguera Delgado e36b89
+
Alain Reguera Delgado e36b89
top-module;;
Alain Reguera Delgado e36b89
    This modules are stored in the first level of Modules directory.
Alain Reguera Delgado e36b89
    This type of modules initiate module environments for specific
Alain Reguera Delgado e36b89
    tasks so it can be called from anywhere inside *centos-art.sh*
Alain Reguera Delgado e36b89
    script.
Alain Reguera Delgado e36b89
sub-module;;
Alain Reguera Delgado e36b89
    This modules are stored from the second-level of Modules directory
Alain Reguera Delgado e36b89
    on. This type of modules can be executed from top-modules,
Alain Reguera Delgado e36b89
    sub-modules, or sib-modules but never the *centos-art.sh* file
Alain Reguera Delgado e36b89
    itself.
Alain Reguera Delgado e36b89
sib-module;;
Alain Reguera Delgado e36b89
    This modules are stored from the second-level of Modules directory
Alain Reguera Delgado e36b89
    on. This type of modules can be executed from sub-modules or
Alain Reguera Delgado e36b89
    sib-modules, but never top-modules or the *centos-art.sh* file
Alain Reguera Delgado e36b89
    itself.
Alain Reguera Delgado e36b89
-g::
Alain Reguera Delgado e36b89
    This option specifies the module-specific option you want to pass
Alain Reguera Delgado e36b89
    for processing in the module environment you are about to execute.
Alain Reguera Delgado e36b89
    Generally, module-specific options are passed through
Alain Reguera Delgado e36b89
    *centos-art.sh* command-line but you may need to pass them
Alain Reguera Delgado e36b89
    internally in some cases (e.g., you are executing a top-module
Alain Reguera Delgado e36b89
    from a sub-module). If you need to pass more than one option, then
Alain Reguera Delgado e36b89
    you need to put the -g option before each option you want to pass.
Alain Reguera Delgado e36b89
Alain Reguera Delgado e36b89
Bugs
Alain Reguera Delgado e36b89
----
Alain Reguera Delgado e36b89
Alain Reguera Delgado e36b89
In the very beginning of *tcar_setModuleEnvironment* function, it used
Alain Reguera Delgado e36b89
just non-array variables and it worked fine for top-module and sub-module
Alain Reguera Delgado e36b89
processing, however when it was needed to do sibling processing, it
Alain Reguera Delgado e36b89
didn't work as expected. The failure was produced because a wrong
Alain Reguera Delgado e36b89
variable assignment when tried to set the path of the next module to
Alain Reguera Delgado e36b89
load. There was not a clean way to ``remember'' what was the base
Alain Reguera Delgado e36b89
directory of the parent directory, so it ended up using the last
Alain Reguera Delgado e36b89
loaded module base directory which made impossible to load a sibling
Alain Reguera Delgado e36b89
module.  The *tcar_setModuleEnvironment* function as implemented in
Alain Reguera Delgado e36b89
version 0.5 of The CentOS Artwork Repository, fixes this issue 
Alain Reguera Delgado e36b89
replacing non-array variables by array variables which can remember
Alain Reguera Delgado e36b89
module information.
Alain Reguera Delgado e36b89
Alain Reguera Delgado e36b89
See also: https://centos.org.cu/bugs/[https://centos.org.cu/bugs/]
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
Author
Alain Reguera Delgado 06ab0f
------
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
The *centos-art.sh* script has received contribution from the
Alain Reguera Delgado 06ab0f
following people:
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado e36b89
* Alain Reguera Delgado <mailto:al@centos.org.cu[al@centos.org.cu]>, 2009-2013
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
Copyright
Alain Reguera Delgado 06ab0f
---------
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado e36b89
Copyright (C) 2009-2013 The CentOS Artwork SIG
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
This program is free software; you can redistribute it and/or modify
Alain Reguera Delgado 06ab0f
it under the terms of the GNU General Public License as published by
Alain Reguera Delgado 06ab0f
the Free Software Foundation; either version 2 of the License, or (at
Alain Reguera Delgado 06ab0f
your option) any later version.
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
This program is distributed in the hope that it will be useful, but
Alain Reguera Delgado 06ab0f
WITHOUT ANY WARRANTY; without even the implied warranty of
Alain Reguera Delgado 06ab0f
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Alain Reguera Delgado 06ab0f
General Public License for more details.
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
You should have received a copy of the GNU General Public License
Alain Reguera Delgado 06ab0f
along with this program; if not, write to the Free Software
Alain Reguera Delgado 06ab0f
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Alain Reguera Delgado 06ab0f
Alain Reguera Delgado 06ab0f
// vim: set syntax=asciidoc: