Blame tcar-scripts-docs/Manpages/tcar_setModuleEnvironment.sh.asciidoc

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