Blame Manual/centos-art.sh-html/repository_69.html

34051a
34051a
<html>
d1db00
d1db00
organization, and administration of CentOS Artwork Repository.
d1db00
d1db00
Copyright C 2009-2011 Alain Reguera Delgado
34051a
34051a
Permission is granted to copy, distribute and/or modify this document
34051a
under the terms of the GNU Free Documentation License, Version 1.2 or
34051a
any later version published by the Free Software Foundation; with no
34051a
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
34051a
copy of the license is included in the section entitled GNU Free
34051a
Documentation License.  
34051a
-->
52772c
34051a
34051a
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
34051a
            Karl Berry  <karl@freefriends.org>
34051a
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
34051a
            and many others.
34051a
Maintained by: Many creative people <dev@texi2html.cvshome.org>
34051a
Send bugs and suggestions to <users@texi2html.cvshome.org>
34051a
34051a
-->
34051a
<head>
52772c
<title>CentOS Artwork Repository: 2.62 The trunk/Scripts/Bash Directory</title>
34051a
52772c
<meta name="description" content="CentOS Artwork Repository: 2.62 The trunk/Scripts/Bash Directory">
52772c
<meta name="keywords" content="CentOS Artwork Repository: 2.62 The trunk/Scripts/Bash Directory">
34051a
<meta name="resource-type" content="document">
34051a
<meta name="distribution" content="global">
34051a
<meta name="Generator" content="texi2html 1.76">
34051a
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
34051a
<style type="text/css">
34051a
34051a
@import "/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/common.css";
34051a
34051a
a.summary-letter {text-decoration: none}
34051a
pre.display {font-family: serif}
34051a
pre.format {font-family: serif}
34051a
pre.menu-comment {font-family: serif}
34051a
pre.menu-preformatted {font-family: serif}
34051a
pre.smalldisplay {font-family: serif; font-size: smaller}
34051a
pre.smallexample {font-size: smaller}
34051a
pre.smallformat {font-family: serif; font-size: smaller}
34051a
pre.smalllisp {font-size: smaller}
34051a
span.sansserif {font-family:sans-serif; font-weight:normal;}
34051a
ul.toc {list-style: none}
34051a
-->
34051a
</style>
34051a
34051a
34051a
</head>
34051a
34051a
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
34051a
34051a
52772c
[ < ]
52772c
[ > ]
34051a
   
52772c
[ << ]
52772c
[ Up ]
52772c
[ >> ]
34051a
   
34051a
   
34051a
   
34051a
   
34051a
[Top]
34051a
[Contents]
52772c
[Index]
34051a
[ ? ]
34051a
52772c
52772c
52772c

2.62 The <tt>`trunk/Scripts/Bash'</tt> Directory

632e8b
632e8b
52772c
52772c

2.62.1 Goals

632e8b
52772c

The <tt>`trunk/Scripts/Bash'</tt> directory exists to organize the trunk

52772c
development line of <tt>`centos-art.sh'</tt> automation script.  The
52772c
<tt>`centos-art.sh'</tt> script standardizes frequent tasks inside your
52772c
working copy of CentOS Artwork Repository.
52772c

632e8b
52772c
52772c

2.62.2 Description

632e8b
52772c

The best way to understand <tt>`centos-art.sh'</tt> automation script is

52772c
studying its source code.  However, as start point, you may prefer to
52772c
read an introductory resume before diving into the source code
52772c
details.
52772c

52772c

The <tt>`centos-art.sh'</tt> script is written in Bash. Most tasks, inside

52772c
<tt>`centos-art.sh'</tt> script, have been organized in many specific
52772c
functionalities that you can invoke from the centos-art
52772c
command-line interface.
52772c

52772c

When you type the centos-art command in your terminal, the

52772c
operating system trys to execute that command. In order to execute the
52772c
command, the operating system needs to know where it is, so the
52772c
operating system uses the PATH environment variable to look for
52772c
that command location. If your system was prepared to use CentOS
52772c
Artwork Repository correctly (-- Removed(pxref:trunk Scripts Bash Functions
52772c
Verify) --), you should have a symbolic link inside <tt>`~/bin/'</tt>
52772c
directory that points to the <tt>`centos-art.sh'</tt> script file. As
52772c
<tt>`~/bin/'</tt> directory is, by default, inside PATH environment
52772c
variable, the execution of centos-art command runs the
52772c
<tt>`centos-art.sh'</tt> script.
52772c

52772c

When <tt>`centos-art.sh'</tt> script is executed, the first it does is

52772c
executing the <tt>`trunk/Scripts/Bash/initEnvironment.sh'</tt> script to
52772c
initialize global variables (e.g., gettext variables) and
52772c
global function scripts.  Global function scripts are located inside
52772c
<tt>`trunk/Scripts/Bash/Functions'</tt> directory and their file names
52772c
begin with <samp>`cli'</samp>. Global function scripts provide common
52772c
functionalities that can be used anywhere inside <tt>`centos-art.sh'</tt>
52772c
script execution environment.
52772c

52772c

Once global variables and function scripts have been loaded,

52772c
<tt>`centos-art.sh'</tt> script executes the cli global function
52772c
from <tt>`cli.sh'</tt> function script to retrive command-line arguments
52772c
and define some default values that may be used later by specific
52772c
function scripts (-- Removed(pxref:trunk Scripts Bash Functions) --).
52772c

52772c

As convenction, the <tt>`centos-art.sh'</tt> command-line arguments have

52772c
the following format:
52772c

52772c
centos-art arg1 --arg2=val2 --arg3=val3
52772c
52772c

In the above example, <samp>`centos-art'</samp> is the command you use to

52772c
invoke <tt>`centos-art.sh'</tt> script. The <samp>`arg1'</samp> is required and
52772c
represents the functionality you want to perform (e.g.,
52772c
<samp>`verify'</samp>, <samp>`render'</samp>, <samp>`locale'</samp>, <samp>`manual'</samp>,
52772c
etc.). The remaining arguments are modifiers to <samp>`arg1'</samp>. The
52772c
<samp>`--arg2'</samp> definition is required and represets, specifically,
52772c
the action inside the functionality you want to perform.  The
52772c
<samp>`--arg3'</samp> and on, are optional.
52772c

52772c

Once command-line arguments have been retrived, the

52772c
<tt>`centos-art.sh'</tt> script loads specific functionalities using the
52772c
<tt>`cli_getFunctions.sh'</tt> function script. Only one specific
52772c
functionality can be loaded at one script execution I.e., you run
52772c
centos-art.sh script to run just one functionality.
52772c

52772c
52772c
+----------------------------------------------------------------------+
52772c
| [centos@host]$ centos-art function --action='value' --option='value' |
52772c
+----------------------------------------------------------------------+
52772c
| ~/bin/centos-art --> ~/artwork/trunk/Scripts/Bash/centos-art.sh      |
52772c
+---v-----------------------------------------v------------------------+
52772c
    | centos-art.sh                           |
52772c
    +---v---------------------------------v---+
52772c
    .   | initEnvironment.sh              |   .
52772c
    .   +---------------------------------+   .
52772c
    .   | cli $@                          |   .
52772c
    .   +---v-------------------------v---+   .
52772c
    .   .   | cli_getFunctions        |   .   .
52772c
    .   .   +---v-----------------v---+   .   .
52772c
    .   .   .   | function1       |   .   .   .
52772c
    .   .   .   | function2       |   .   .   .
52772c
    .   .   .   | function3       |   .   .   .
52772c
    .   .   .   +-----------------+   .   .   .
52772c
    .   .   ...........................   .   .
52772c
    .   ...................................   .
52772c
    ...........................................
52772c
52772c

Figure 2.1: The functionalities initialization environment.

52772c
52772c

52772c

Functionalities are implemented by means of actions. Once the

52772c
functionality has been initiazalized, actions initialization take
52772c
place for that functionality. Actions initialization model is very
52772c
similar to functions initialization model. But with the difference,
52772c
that actions are loaded inside function environment, and so, share
52772c
variables and functions defined inside function environment.
52772c

52772c
52772c
+--------------------------------------+
52772c
| cli_getFunctions                     |
52772c
+---v------------------------------v---+
52772c
.   | function1                    |   .
52772c
.   +---v----------------------v---+   .
52772c
.   .   | function1_getActions |   .   .
52772c
.   .   +---v--------------v---+   .   .
52772c
.   .   .   | action 1     |   .   .   .
52772c
.   .   .   | action 2     |   .   .   .
52772c
.   .   .   | action n     |   .   .   .
52772c
.   .   .   +--------------+   .   .   .
52772c
.   .   ........................   .   .
52772c
.   ................................   .
52772c
.   +------------------------------+   .
52772c
.   | function2                    |   .
52772c
.   +---v----------------------v---+   .
52772c
.   .   | function2_getActions |   .   .
52772c
.   .   +---v--------------v---+   .   .
52772c
.   .   .   | action 1     |   .   .   .
52772c
.   .   .   | action 2     |   .   .   .
52772c
.   .   .   | action n     |   .   .   .
52772c
.   .   .   +--------------+   .   .   .
52772c
.   .   ........................   .   .
52772c
.   ................................   .
52772c
.   +------------------------------+   .
52772c
.   | function3                    |   .
52772c
.   +---v----------------------v---+   .
52772c
.   .   | function3_getActions |   .   .
52772c
.   .   +---v--------------v---+   .   .
52772c
.   .   .   | action 1     |   .   .   .
52772c
.   .   .   | action 2     |   .   .   .
52772c
.   .   .   | action n     |   .   .   .
52772c
.   .   .   +--------------+   .   .   .
52772c
.   .   ........................   .   .
52772c
.   ................................   .
52772c
........................................
52772c
52772c

Figure 2.2: The actions initialization environment.

52772c
52772c

632e8b
52772c
52772c

2.62.3 Usage

34051a
52772c

The <tt>`centos-art.sh'</tt> script usage information is described inside

52772c
each specific function documentation (-- Removed(pxref:trunk Scripts Bash
52772c
Functions) --).
52772c

34051a
52772c
52772c

2.62.4 See also

632e8b
52772c
52772c
2.61 The <tt>`trunk/Scripts'</tt> Directory  
52772c
52772c
632e8b
632e8b
34051a
52772c
[ < ]
52772c
[ > ]
34051a
   
52772c
[ << ]
52772c
[ Up ]
52772c
[ >> ]
34051a
34051a

34051a
 <font size="-1">
52772c
  This document was generated on March, 22 2011 using texi2html 1.76.
34051a
 </font>
34051a
 
34051a
34051a

34051a
</body>
34051a
</html>