|
|
010b2d |
|
|
|
010b2d |
<html>
|
|
|
d1db00 |
|
|
|
d1db00 |
organization, and administration of CentOS Artwork Repository.
|
|
|
d1db00 |
|
|
|
d1db00 |
Copyright C 2009-2011 Alain Reguera Delgado
|
|
|
010b2d |
|
|
|
010b2d |
Permission is granted to copy, distribute and/or modify this document
|
|
|
010b2d |
under the terms of the GNU Free Documentation License, Version 1.2 or
|
|
|
010b2d |
any later version published by the Free Software Foundation; with no
|
|
|
010b2d |
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
|
|
|
010b2d |
copy of the license is included in the section entitled GNU Free
|
|
|
010b2d |
Documentation License.
|
|
|
010b2d |
-->
|
|
|
f456e5 |
|
|
|
010b2d |
|
|
|
010b2d |
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
|
|
010b2d |
Karl Berry <karl@freefriends.org>
|
|
|
010b2d |
Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
|
|
010b2d |
and many others.
|
|
|
010b2d |
Maintained by: Many creative people <dev@texi2html.cvshome.org>
|
|
|
010b2d |
Send bugs and suggestions to <users@texi2html.cvshome.org>
|
|
|
010b2d |
|
|
|
010b2d |
-->
|
|
|
010b2d |
<head>
|
|
|
ed9de5 |
<title>CentOS Artwork Repository: 2.60 The trunk/Scripts Directory</title>
|
|
|
010b2d |
|
|
|
ed9de5 |
<meta name="description" content="CentOS Artwork Repository: 2.60 The trunk/Scripts Directory">
|
|
|
ed9de5 |
<meta name="keywords" content="CentOS Artwork Repository: 2.60 The trunk/Scripts Directory">
|
|
|
010b2d |
<meta name="resource-type" content="document">
|
|
|
010b2d |
<meta name="distribution" content="global">
|
|
|
010b2d |
<meta name="Generator" content="texi2html 1.76">
|
|
|
010b2d |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
010b2d |
<style type="text/css">
|
|
|
010b2d |
|
|
|
f456e5 |
@import "/home/centos/artwork/trunk/Identity/Manual/repository.css";
|
|
|
010b2d |
|
|
|
010b2d |
a.summary-letter {text-decoration: none}
|
|
|
010b2d |
pre.display {font-family: serif}
|
|
|
010b2d |
pre.format {font-family: serif}
|
|
|
010b2d |
pre.menu-comment {font-family: serif}
|
|
|
010b2d |
pre.menu-preformatted {font-family: serif}
|
|
|
010b2d |
pre.smalldisplay {font-family: serif; font-size: smaller}
|
|
|
010b2d |
pre.smallexample {font-size: smaller}
|
|
|
010b2d |
pre.smallformat {font-family: serif; font-size: smaller}
|
|
|
010b2d |
pre.smalllisp {font-size: smaller}
|
|
|
010b2d |
span.sansserif {font-family:sans-serif; font-weight:normal;}
|
|
|
010b2d |
ul.toc {list-style: none}
|
|
|
010b2d |
-->
|
|
|
010b2d |
</style>
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
010b2d |
</head>
|
|
|
010b2d |
|
|
|
010b2d |
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
1075b9 |
[ < ]
|
|
|
52772c |
[ > ]
|
|
|
010b2d |
|
|
|
1075b9 |
[ << ]
|
|
|
1075b9 |
[ Up ]
|
|
|
ed9de5 |
[ >> ]
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
1075b9 |
[Top]
|
|
|
1075b9 |
[Contents]
|
|
|
ed9de5 |
[Index]
|
|
|
1075b9 |
[ ? ]
|
|
|
010b2d |
|
|
|
ed9de5 |
|
|
|
52772c |
|
|
|
ed9de5 |
2.60 The <tt>`trunk/Scripts'</tt> Directory
|
|
|
52772c |
|
|
|
52772c |
|
|
|
52772c |
|
|
|
52772c |
2.60.1 Goals
|
|
|
52772c |
|
|
|
ed9de5 |
The <tt>`trunk/Scripts'</tt> directory exists to organize the trunk
|
|
|
ed9de5 |
development line of <tt>`centos-art.sh'</tt> automation script. The
|
|
|
ed9de5 |
<tt>`centos-art.sh'</tt> script standardizes tasks you need to do
|
|
|
ed9de5 |
frequently inside CentOS Artwork Repository.
|
|
|
ed9de5 |
|
|
|
52772c |
|
|
|
52772c |
|
|
|
52772c |
2.60.2 Description
|
|
|
52772c |
|
|
|
ed9de5 |
The best way to understand <tt>`centos-art.sh'</tt> automation script is
|
|
|
ed9de5 |
studying its source code. However, as start point, you may prefer to
|
|
|
ed9de5 |
read an introductory resume before diving into the source code
|
|
|
ed9de5 |
details.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
The <tt>`centos-art.sh'</tt> script is written in Bash. Most tasks, inside
|
|
|
ed9de5 |
<tt>`centos-art.sh'</tt> script, have been organized in many specific
|
|
|
ed9de5 |
functionalities that you can invoke from the centos-art
|
|
|
ed9de5 |
command-line interface.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
When you type the centos-art command in your terminal, the
|
|
|
ed9de5 |
operating system trys to execute that command. In order to execute the
|
|
|
ed9de5 |
command, the operating system needs to know where it is, so the
|
|
|
ed9de5 |
operating system uses the PATH environment variable to look for
|
|
|
ed9de5 |
that command location. If your system was prepared to use CentOS
|
|
|
ed9de5 |
Artwork Repository correctly (-- Removed(pxref:trunk Scripts Bash Functions
|
|
|
ed9de5 |
Verify) --), you should have a symbolic link inside <tt>`~/bin/'</tt>
|
|
|
ed9de5 |
directory that points to the <tt>`centos-art.sh'</tt> script file. As
|
|
|
ed9de5 |
<tt>`~/bin/'</tt> directory is, by default, inside PATH environment
|
|
|
ed9de5 |
variable, the execution of centos-art command runs the
|
|
|
ed9de5 |
<tt>`centos-art.sh'</tt> script.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
When <tt>`centos-art.sh'</tt> script is executed, the first it does is
|
|
|
ed9de5 |
executing the <tt>`trunk/Scripts/Bash/initEnvironment.sh'</tt> script to
|
|
|
ed9de5 |
initialize global variables (e.g., gettext variables) and
|
|
|
ed9de5 |
global function scripts. Global function scripts are located inside
|
|
|
ed9de5 |
<tt>`trunk/Scripts/Bash/Functions'</tt> directory and their file names
|
|
|
ed9de5 |
begin with <samp>`cli'</samp>. Global function scripts provide common
|
|
|
ed9de5 |
functionalities that can be used anywhere inside <tt>`centos-art.sh'</tt>
|
|
|
ed9de5 |
script execution environment.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
Once global variables and function scripts have been loaded,
|
|
|
ed9de5 |
<tt>`centos-art.sh'</tt> script executes the cli global function
|
|
|
ed9de5 |
from <tt>`cli.sh'</tt> function script to retrive command-line arguments
|
|
|
ed9de5 |
and define some default values that may be used later by specific
|
|
|
ed9de5 |
function scripts (-- Removed(pxref:trunk Scripts Bash Functions) --).
|
|
|
ed9de5 |
|
|
|
ed9de5 |
As convenction, the <tt>`centos-art.sh'</tt> command-line arguments have
|
|
|
ed9de5 |
the following format:
|
|
|
ed9de5 |
|
|
|
ed9de5 |
centos-art function path/to/dir --options
|
|
|
ed9de5 |
|
|
|
ed9de5 |
In the above example, <samp>`centos-art'</samp> is the command you use to
|
|
|
ed9de5 |
invoke <tt>`centos-art.sh'</tt> script. The <samp>`arg1'</samp> is required and
|
|
|
ed9de5 |
represents the functionality you want to perform (e.g.,
|
|
|
ed9de5 |
<samp>`verify'</samp>, <samp>`render'</samp>, <samp>`locale'</samp>, <samp>`manual'</samp>,
|
|
|
ed9de5 |
etc.). The remaining arguments are modifiers to <samp>`arg1'</samp>. The
|
|
|
ed9de5 |
<samp>`--arg2'</samp> definition is required and represets, specifically,
|
|
|
ed9de5 |
the action inside the functionality you want to perform. The
|
|
|
ed9de5 |
<samp>`--arg3'</samp> and on, are optional.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
Once command-line arguments have been retrived, the
|
|
|
ed9de5 |
<tt>`centos-art.sh'</tt> script loads specific functionalities using the
|
|
|
ed9de5 |
<tt>`cli_getFunctions.sh'</tt> function script. Only one specific
|
|
|
ed9de5 |
functionality can be loaded at one script execution I.e., you run
|
|
|
ed9de5 |
centos-art.sh script to run just one functionality.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
|
|
|
ed9de5 |
+----------------------------------------------------------------------+
|
|
|
ed9de5 |
| [centos@host]$ centos-art function --action='value' --option='value' |
|
|
|
ed9de5 |
+----------------------------------------------------------------------+
|
|
|
ed9de5 |
| ~/bin/centos-art --> ~/artwork/trunk/Scripts/centos-art.sh |
|
|
|
ed9de5 |
+---v-----------------------------------------v------------------------+
|
|
|
ed9de5 |
| centos-art.sh |
|
|
|
ed9de5 |
+---v---------------------------------v---+
|
|
|
ed9de5 |
. | initEnvironment.sh | .
|
|
|
ed9de5 |
. +---------------------------------+ .
|
|
|
ed9de5 |
. | cli $@ | .
|
|
|
ed9de5 |
. +---v-------------------------v---+ .
|
|
|
ed9de5 |
. . | cli_getFunctions | . .
|
|
|
ed9de5 |
. . +---v-----------------v---+ . .
|
|
|
ed9de5 |
. . . | function1 | . . .
|
|
|
ed9de5 |
. . . | function2 | . . .
|
|
|
ed9de5 |
. . . | function3 | . . .
|
|
|
ed9de5 |
. . . +-----------------+ . . .
|
|
|
ed9de5 |
. . ........................... . .
|
|
|
ed9de5 |
. ................................... .
|
|
|
ed9de5 |
...........................................
|
|
|
ed9de5 |
|
|
|
ed9de5 |
Figure 2.1: The functionalities initialization environment.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
|
|
|
ed9de5 |
Functionalities are implemented by means of actions. Once the
|
|
|
ed9de5 |
functionality has been initiazalized, actions initialization take
|
|
|
ed9de5 |
place for that functionality. Actions initialization model is very
|
|
|
ed9de5 |
similar to functions initialization model. But with the difference,
|
|
|
ed9de5 |
that actions are loaded inside function environment, and so, share
|
|
|
ed9de5 |
variables and functions defined inside function environment.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
|
|
|
ed9de5 |
+--------------------------------------+
|
|
|
ed9de5 |
| cli_getFunctions |
|
|
|
ed9de5 |
+---v------------------------------v---+
|
|
|
ed9de5 |
. | function1 | .
|
|
|
ed9de5 |
. +---v------------------------v-+ .
|
|
|
ed9de5 |
. . | function1_getArguments | . .
|
|
|
ed9de5 |
. . +---v--------------v-----+ . .
|
|
|
ed9de5 |
. . . | action 1 | . . .
|
|
|
ed9de5 |
. . . | action 2 | . . .
|
|
|
ed9de5 |
. . . | action n | . . .
|
|
|
ed9de5 |
. . . +--------------+ . . .
|
|
|
ed9de5 |
. . .......................... . .
|
|
|
ed9de5 |
. ................................ .
|
|
|
ed9de5 |
. +------------------------------+ .
|
|
|
ed9de5 |
. | function2 | .
|
|
|
ed9de5 |
. +---v------------------------v-+ .
|
|
|
ed9de5 |
. . | function2_getArguments | . .
|
|
|
ed9de5 |
. . +---v--------------v-----+ . .
|
|
|
ed9de5 |
. . . | action 1 | . . .
|
|
|
ed9de5 |
. . . | action 2 | . . .
|
|
|
ed9de5 |
. . . | action n | . . .
|
|
|
ed9de5 |
. . . +--------------+ . . .
|
|
|
ed9de5 |
. . .......................... . .
|
|
|
ed9de5 |
. ................................ .
|
|
|
ed9de5 |
. +------------------------------+ .
|
|
|
ed9de5 |
. | function3 | .
|
|
|
ed9de5 |
. +---v------------------------v-+ .
|
|
|
ed9de5 |
. . | function3_getArguments | . .
|
|
|
ed9de5 |
. . +---v--------------v-----+ . .
|
|
|
ed9de5 |
. . . | action 1 | . . .
|
|
|
ed9de5 |
. . . | action 2 | . . .
|
|
|
ed9de5 |
. . . | action n | . . .
|
|
|
ed9de5 |
. . . +--------------+ . . .
|
|
|
ed9de5 |
. . .......................... . .
|
|
|
ed9de5 |
. ................................ .
|
|
|
ed9de5 |
........................................
|
|
|
ed9de5 |
|
|
|
ed9de5 |
Figure 2.2: The actions initialization environment.
|
|
|
ed9de5 |
|
|
|
ed9de5 |
|
|
|
52772c |
|
|
|
52772c |
|
|
|
52772c |
2.60.3 Usage
|
|
|
52772c |
|
|
|
ed9de5 |
The <tt>`centos-art.sh'</tt> script usage information is described inside
|
|
|
ed9de5 |
each specific function documentation (-- Removed(pxref:trunk Scripts Bash
|
|
|
ed9de5 |
Functions) --).
|
|
|
ed9de5 |
|
|
|
52772c |
|
|
|
52772c |
|
|
|
52772c |
2.60.4 See also
|
|
|
9bfd15 |
|
|
|
ed9de5 |
|
|
|
ed9de5 |
2.60 The <tt>`trunk/Scripts'</tt> Directory
|
|
|
ed9de5 |
|
|
|
ed9de5 |
|
|
|
ed9de5 |
|
|
|
063806 |
|
|
|
063806 |
|
|
|
010b2d |
|
|
|
52772c |
[ < ]
|
|
|
1075b9 |
[ > ]
|
|
|
010b2d |
|
|
|
1075b9 |
[ << ]
|
|
|
52772c |
[ Up ]
|
|
|
ed9de5 |
[ >> ]
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
010b2d |
<font size="-1">
|
|
|
f456e5 |
This document was generated on March, 24 2011 using texi2html 1.76.
|
|
|
010b2d |
</font>
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
010b2d |
|
|
|
010b2d |
</body>
|
|
|
010b2d |
</html>
|