Blame Manuals/en/Html/Repository/repository_41.html

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

3.38 trunk/Scripts/Bash

54264c
54264c
008ee0
54264c

3.38.1 Goals

54264c
54b5a5

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

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

54264c
008ee0
54264c

3.38.2 Description

54264c
54b5a5

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

54b5a5
studying its source code. The <tt>`centos-art.sh'</tt> script is splited
54b5a5
in several configuration and function files which are loaded when the
54b5a5
<tt>`centos-art.sh'</tt> script is executed. This section describes the
54b5a5
order in which <tt>`centos-art.sh'</tt> loads its configuration and
54b5a5
function files.
54b5a5

54b5a5

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

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

54b5a5

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

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

54b5a5

Once global variables and function scripts have been loaded,

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

54b5a5

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

54b5a5
the following format:
54b5a5

54b5a5
centos-art arg1 --arg2=val2 --arg3=val3
54b5a5
54b5a5

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

54b5a5
invoke <tt>`centos-art.sh'</tt> script. The <samp>`arg1'</samp> represents the
54b5a5
action you want to do (e.g., <samp>`verify'</samp>, <samp>`render'</samp>,
54b5a5
<samp>`locale'</samp>, <samp>`help'</samp>, etc.). The remaining arguments are
54b5a5
modifiers to <samp>`arg1'</samp>. The <samp>`--arg2'</samp> definition is
54b5a5
required.  The <samp>`--arg3'</samp> is optional. For example, if you want
54b5a5
to render all anaconda progress slides, for all major releases of
54b5a5
CentOS distribution, for all languages availabe using TreeFlower motif
54b5a5
as background, you use the following command:
54b5a5

54b5a5
centos-art render --entry=trunk/Identity/Themes/Motifs/TreeFlower/Distro/Anaconda/Progress
54b5a5
54b5a5

Now, if you only want to render anaconda progress

54b5a5
<tt>`01-welcome.png'</tt> slide, for CentOS distribution major release 5,
54b5a5
in English language, you need to add the third argument as follows:
54b5a5

54b5a5
centos-art render --entry=trunk/Identity/Themes/Motifs/TreeFlower/Distro/Anaconda/Progress --filter=5/en/01-welcome
54b5a5
54b5a5

Once command-line arguments have been retrived, the

54b5a5
<tt>`centos-art.sh'</tt> script loads specific functions using the
54b5a5
<tt>`cli_getActions.sh'</tt> function script.  For example, if you run the
54b5a5
command centos-art render --entry, the <tt>`centos-art.sh'</tt>
54b5a5
script will look for <tt>`trunk/Scripts/Bash/Functions/Render'</tt>
54b5a5
directory and will load the render function from
54b5a5
<tt>`render.sh'</tt> function script; this, in order to achive the
54b5a5
rendering task as it defines.
54b5a5

54b5a5
54b5a5
+------------------------------------------------------------------+
54b5a5
| [centos@host]$ centos-art action 'path/to/dir' --option='value'  |
54b5a5
+------------------------------------------------------------------+
54b5a5
| ~/bin/centos-art --> ~/artwork/trunk/Scripts/Bash/centos-art.sh  |
54b5a5
+---v-----------------------------------------v--------------------+
54b5a5
    | centos-art.sh                           |
54b5a5
    +---v---------------------------------v---+
54b5a5
    .   | initFunctions.sh                |   .
54b5a5
    .   +---------------------------------+   .
54b5a5
    .   | cli $@                          |   .
54b5a5
    .   +---v-------------------------v---+   .
54b5a5
    .   .   | cli_getActions $@       |   .   .
54b5a5
    .   .   +---v-----------------v---+   .   .
54b5a5
    .   .   .   | function call 1 |   .   .   .
54b5a5
    .   .   .   | function call 2 |   .   .   .
54b5a5
    .   .   .   | function call n |   .   .   .
54b5a5
    .   .   .   +-----------------+   .   .   .
54b5a5
    .   .   ...........................   .   .
54b5a5
    .   ...................................   .
54b5a5
    ...........................................
54b5a5
54b5a5

Figure 3.8: The <tt>`centos-art.sh'</tt> initialization environment.

54b5a5
54b5a5

54264c
008ee0
54264c

3.38.3 Usage

54264c
54b5a5

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

54b5a5
each specific function documentation (see section trunk/Scripts/Bash/Functions).
54b5a5

54264c
008ee0
54264c

3.38.4 See also

4c79b5
54b5a5
54b5a5
3.37 trunk/Scripts  
54b5a5
54b5a5
3.39 trunk/Scripts/Bash/Functions  
54b5a5
54b5a5
3.49 trunk/Scripts/Bash/Locale  
54b5a5
54b5a5
4c79b5
6ba043
4c79b5
008ee0
[ < ]
008ee0
[ > ]
4c79b5
   
4c79b5
[ << ]
008ee0
[ Up ]
54b5a5
[ >> ]
4c79b5
4c79b5

4c79b5
 <font size="-1">
008ee0
  This document was generated on December, 2 2010 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

4c79b5
</body>
4c79b5
</html>