Blame Manuals/en/Html/Repository/repository_36.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
-->
5fb024
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>
5fb024
<title>CentOS Artwork Repository: 3.33 trunk/Scripts/Bash</title>
4c79b5
5fb024
<meta name="description" content="CentOS Artwork Repository: 3.33 trunk/Scripts/Bash">
5fb024
<meta name="keywords" content="CentOS Artwork Repository: 3.33 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
5fb024
[ < ]
5fb024
[ > ]
4c79b5
   
4c79b5
[ << ]
4c79b5
[ Up ]
5fb024
[ >> ]
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
   
4c79b5
[Top]
4c79b5
[Contents]
5fb024
[Index]
4c79b5
[ ? ]
4c79b5
5fb024
5fb024
5fb024

3.33 trunk/Scripts/Bash

bc3531
bc3531
5fb024
bc3531

3.33.1 Goals

bc3531
5fb024

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

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

bc3531
5fb024
bc3531

3.33.2 Description

bc3531
5fb024

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

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

5fb024

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

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

5fb024

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

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

5fb024

Once gettext variables and all function scripts have been

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

5fb024

The cli_getActions function defines which actions the

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

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

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

5fb024
5fb024

bc3531
5fb024
5fb024

3.33.2.1 The identity matching list

bc3531
5fb024

The identity matching list is used by identity rendering functions to

5fb024
define the relation between translation files and identity design
5fb024
templates. 
5fb024

5fb024
5fb024
5fb024

3.33.2.2 Adding new features

5fb024
5fb024

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

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

5fb024
5fb024
bc3531

3.33.3 Usage

bc3531
bc3531
5fb024
5fb024

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

5fb024
5fb024

This feature is supported through the following command:

5fb024

5fb024
5fb024
<samp>`centos-art check'</samp>
5fb024

This command verifies paths, symbolic links, installed packages and

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

5fb024
Warning

Warning

If this is the first time you run

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

~/artwork/trunk/Scripts/Bash/centos-art.sh check
5fb024
5fb024
5fb024
5fb024
5fb024
5fb024
5fb024

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

bc3531
5fb024

This feature is not supported yet.

5fb024

5fb024
5fb024
<samp>`centos-art search 'pattern''</samp>
5fb024
5fb024

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

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

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

Use this command to search repository entries that match pattern1

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

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

Use this command to search repository entries that match

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

5fb024
5fb024
5fb024
5fb024
5fb024
5fb024

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

5fb024
5fb024

This feature is not supported yet.

5fb024

5fb024
5fb024
<samp>`centos-art path 'path/to/dir/' --copy-to='path/to/dir''</samp>
5fb024
<samp>`centos-art path 'path/to/dir/' --copy-to='path/to/dir/filename''</samp>
5fb024
<samp>`centos-art path 'path/to/dir/' --move-to='path/to/dir''</samp>
5fb024
<samp>`centos-art path 'path/to/dir/' --move-to='path/to/dir/filename''</samp>
5fb024
<samp>`centos-art path 'path/to/dir/' --remove'</samp>
5fb024
5fb024
5fb024
5fb024
5fb024

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

5fb024
5fb024

This feature is not supported yet.

5fb024

5fb024
5fb024
<samp>`centos-art locale-art 'path/to/dir' --edit'</samp>
5fb024
<samp>`centos-art locale-art 'path/to/dir' --edit='filename''</samp>
5fb024
<samp>`centos-art locale-art 'path/to/dir' --list'</samp>
5fb024
<samp>`centos-art locale-art 'path/to/dir' --list='filename''</samp>
5fb024
5fb024
5fb024
5fb024
5fb024

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

5fb024
5fb024

This feature is supported through the following command:

5fb024

5fb024
5fb024
<samp>`centos-art license'</samp>
5fb024

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

5fb024
command its copyright and its license notes.
5fb024

5fb024
5fb024
5fb024
5fb024
bc3531

3.33.4 See also

4c79b5
5fb024
5fb024
3.36 trunk/Scripts/Bash/Functions  
5fb024
5fb024
3.49 trunk/Scripts/Bash/Locale  
5fb024
5fb024
3.32 trunk/Scripts  
5fb024
5fb024
4c79b5
4c79b5
4c79b5
5fb024
[ < ]
5fb024
[ > ]
4c79b5
   
4c79b5
[ << ]
5fb024
[ Up ]
5fb024
[ >> ]
4c79b5
4c79b5

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

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