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

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