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

4c79b5
4c79b5
<html>
4c79b5
4c79b5
can you do inside it.
4c79b5
4c79b5
Copyright C 2009, 2010 CentOS Artwork SIG. 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
-->
1e9202
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>
bc3531
<title>CentOS Artwork Repository: 3.29 trunk/Scripts/Bash</title>
4c79b5
bc3531
<meta name="description" content="CentOS Artwork Repository: 3.29 trunk/Scripts/Bash">
bc3531
<meta name="keywords" content="CentOS Artwork Repository: 3.29 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
1e9202
[ < ]
1e9202
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
1e9202
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
1e9202
[Index]
4c79b5
[ ? ]
4c79b5
bc3531
1e9202
bc3531

3.29 trunk/Scripts/Bash

4c79b5
4c79b5
1e9202
4c79b5

3.29.1 Goals

4c79b5
bc3531

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

bc3531
"trunk" development line of centos-art.sh automation
bc3531
script.  The centos-art.sh script standardize frequent tasks
bc3531
inside your working copy of CentOS Artwork Repository.
bc3531

4c79b5
1e9202
4c79b5

3.29.2 Description

4c79b5
bc3531

The best way to understand centos-art.sh automation script

bc3531
is studying its source code. The centos-art.sh script is
bc3531
splited in several configuration and function files which are loaded
bc3531
when the centos-art.sh script is executed. This section
bc3531
describes the order in which centos-art.sh loads its
bc3531
configuration and function files.
bc3531

bc3531

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

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

bc3531

When centos-art.sh script is executed, the first it does is

bc3531
execute the <tt>`trunk/Scripts/Bash/initFunctions.sh'</tt> file to
bc3531
initialize gettext variables and all function scripts inside
bc3531
<tt>`trunk/Scripts/Bash/Functions'</tt> directory. 
bc3531

bc3531

Once gettext variables and all function scripts have been

bc3531
initialized, the centos-art.sh script initializes its
bc3531
environment variables using the cli_getVariables function.
bc3531
At this point the centos-art.sh script calls the
bc3531
cli_getActions function from cli_getVariables
bc3531
function's bottom. 
bc3531

bc3531

The cli_getActions function defines which actions the

bc3531
centos-art.sh script is able to perform. Inside
bc3531
cli_getActions function, actions are defined combining
bc3531
positional arguments and function calls.
bc3531

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

Figure 3.5: The centos-art.sh initialization environment.

bc3531
bc3531

4c79b5
1e9202
bc3531

3.29.2.1 The identity matching list

4c79b5
bc3531

The identity matching list is used by identity rendering functions to

bc3531
define the relation between translation files and identity design
1e9202
templates. See section trunk/Scripts/Bash/Functions/Config/cli_getIdentityMatchinglist.sh, for more information.
bc3531

bc3531
1e9202
bc3531

3.29.2.2 Adding new features

bc3531
bc3531

To add new features inside centos-art.sh script, you need to

bc3531
set positional arguments and function calls inside
bc3531
cli_getActions function for the new function or functions
bc3531
required by the new feature you want to add.
bc3531

bc3531
1e9202
4c79b5

3.29.3 Usage

4c79b5
4c79b5
1e9202
bc3531

3.29.3.1 The centos-art <samp>`check'</samp> action

bc3531
bc3531

This feature is supported through the following command:

bc3531

bc3531
bc3531
<samp>`centos-art check'</samp>
bc3531

This command verifies paths, symbolic links, installed packages and

bc3531
everything your workstation needs in order to run the
bc3531
centos-art command correctly. 
bc3531

bc3531
Warning

Warning

If this is the first time you run

bc3531
centos-art command, the appropriate way to execute check
bc3531
action is not using the centos-art command, but the absolute
bc3531
path to centos-art.sh script instead:
bc3531

~/artwork/trunk/Scripts/Bash/centos-art.sh check
bc3531
bc3531
bc3531
bc3531
bc3531
1e9202
bc3531

3.29.3.2 The centos-art <samp>`search'</samp> action

4c79b5
bc3531

This feature is not supported yet.

bc3531

bc3531
bc3531
<samp>`centos-art search 'pattern''</samp>
bc3531
bc3531

Use this command to find directories and files that match exactly the

bc3531
posix-regular expression set in <samp>`pattern'</samp> as in <samp>`^pattern$'</samp>.
bc3531

bc3531
bc3531
<samp>`centos-art search 'pattern1 pattern2 patternN''</samp>
bc3531
bc3531

Use this command to search repository entries that match pattern1

bc3531
or patter2 or patternN as in
bc3531
<samp>`'^.*(pattern1|pattern2|patternN).*$''</samp>.
bc3531

bc3531
bc3531
<samp>`centos-art search 'path/to/dir1 path/to/dir2 path/to/dirN''</samp>
bc3531
bc3531

Use this command to search repository entries that match

bc3531
<samp>`path/to/dir1'</samp> or <samp>`path/to/dir2'</samp>, or
bc3531
<samp>`path/to/dirN'</samp> as in
bc3531
<samp>`^.*(path/to/dir1|path/to/dir2|path/to/dirN).*$''</samp>.
bc3531

bc3531
bc3531
bc3531
bc3531
1e9202
bc3531

3.29.3.3 The centos-art <samp>`path'</samp> action

bc3531
bc3531

This feature is not supported yet.

bc3531

bc3531
bc3531
<samp>`centos-art path 'path/to/dir/' --copy-to='path/to/dir''</samp>
bc3531
<samp>`centos-art path 'path/to/dir/' --copy-to='path/to/dir/filename''</samp>
bc3531
<samp>`centos-art path 'path/to/dir/' --move-to='path/to/dir''</samp>
bc3531
<samp>`centos-art path 'path/to/dir/' --move-to='path/to/dir/filename''</samp>
bc3531
<samp>`centos-art path 'path/to/dir/' --remove'</samp>
bc3531
bc3531
bc3531
1e9202
bc3531

3.29.3.4 The centos-art <samp>`locale-art'</samp> action

bc3531
bc3531

This feature is not supported yet.

bc3531

bc3531
bc3531
<samp>`centos-art locale-art 'path/to/dir' --edit'</samp>
bc3531
<samp>`centos-art locale-art 'path/to/dir' --edit='filename''</samp>
bc3531
<samp>`centos-art locale-art 'path/to/dir' --list'</samp>
bc3531
<samp>`centos-art locale-art 'path/to/dir' --list='filename''</samp>
bc3531
bc3531
bc3531
1e9202
bc3531

3.29.3.5 The centos-art <samp>`license'</samp> action

bc3531
bc3531

This feature is supported through the following command:

bc3531

bc3531
bc3531
<samp>`centos-art license'</samp>
bc3531

Use this command to see a brief description of centos-art

bc3531
command its copyright and its license notes.
bc3531

bc3531
bc3531
bc3531
1e9202
4c79b5

3.29.4 See also

4c79b5
bc3531
1e9202
3.30 trunk/Scripts/Bash/Config  
bc3531
1e9202
3.33 trunk/Scripts/Bash/Functions  
bc3531
1e9202
3.45 trunk/Scripts/Bash/Locale  
bc3531
1e9202
3.28 trunk/Scripts  
bc3531
bc3531
4c79b5
4c79b5
4c79b5
1e9202
[ < ]
1e9202
[ > ]
4c79b5
   
4c79b5
[ << ]
1e9202
[ Up ]
1e9202
[ >> ]
4c79b5
4c79b5

4c79b5
 <font size="-1">
1e9202
  This document was generated on October, 3 2010 using texi2html 1.76.
4c79b5
 </font>
4c79b5
 
4c79b5
4c79b5

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