|
|
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 |
-->
|
|
|
3b63ff |
|
|
|
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>
|
|
|
6ba043 |
<title>CentOS Artwork Repository: 3.34 trunk/Scripts/Bash</title>
|
|
|
4c79b5 |
|
|
|
6ba043 |
<meta name="description" content="CentOS Artwork Repository: 3.34 trunk/Scripts/Bash">
|
|
|
6ba043 |
<meta name="keywords" content="CentOS Artwork Repository: 3.34 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 |
|
|
|
d06c98 |
[ < ]
|
|
|
d06c98 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
4c79b5 |
[ Up ]
|
|
|
d06c98 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[Top]
|
|
|
4c79b5 |
[Contents]
|
|
|
d06c98 |
[Index]
|
|
|
4c79b5 |
[ ? ]
|
|
|
4c79b5 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34 trunk/Scripts/Bash
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.1 Goals
|
|
|
6ba043 |
|
|
|
6ba043 |
The <tt>`trunk/Scripts/Bash'</tt> directory exists to organize the
|
|
|
6ba043 |
"trunk" development line of centos-art.sh automation
|
|
|
6ba043 |
script. The centos-art.sh script standardize frequent tasks
|
|
|
6ba043 |
inside your working copy of CentOS Artwork Repository.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.2 Description
|
|
|
6ba043 |
|
|
|
6ba043 |
The best way to understand centos-art.sh automation script
|
|
|
6ba043 |
is studying its source code. The centos-art.sh script is
|
|
|
6ba043 |
splited in several configuration and function files which are loaded
|
|
|
6ba043 |
when the centos-art.sh script is executed. This section
|
|
|
6ba043 |
describes the order in which centos-art.sh loads its
|
|
|
6ba043 |
configuration and function files.
|
|
|
6ba043 |
|
|
|
6ba043 |
When you type the centos-art command in your terminal, the
|
|
|
6ba043 |
operating system trys to execute that command. In order to execute the
|
|
|
6ba043 |
command, the operating system needs to know where it is, so the
|
|
|
6ba043 |
operating system uses the PATH environment variable to look for
|
|
|
6ba043 |
that command's location. If your system was prepared to use CentOS
|
|
|
6ba043 |
Artwork Repository correctly (see usage section above), you should
|
|
|
6ba043 |
have a symbolic link inside <tt>`~/bin/'</tt> directory that points to the
|
|
|
6ba043 |
centos-art.sh script file. As <tt>`~/bin/'</tt> directory is, by
|
|
|
6ba043 |
default, inside PATH environment variable, the execution of
|
|
|
6ba043 |
centos-art command runs the <tt>`centos-art.sh'</tt> script.
|
|
|
6ba043 |
|
|
|
6ba043 |
When centos-art.sh script is executed, the first it does is
|
|
|
6ba043 |
execute the <tt>`trunk/Scripts/Bash/initFunctions.sh'</tt> file to
|
|
|
6ba043 |
initialize gettext variables and all function scripts inside
|
|
|
6ba043 |
<tt>`trunk/Scripts/Bash/Functions'</tt> directory.
|
|
|
6ba043 |
|
|
|
6ba043 |
Once gettext variables and all function scripts have been
|
|
|
6ba043 |
initialized, the centos-art.sh script initializes its
|
|
|
6ba043 |
environment variables using the cli_getVariables function.
|
|
|
6ba043 |
At this point the centos-art.sh script calls the
|
|
|
6ba043 |
cli_getActions function from cli_getVariables
|
|
|
6ba043 |
function's bottom.
|
|
|
6ba043 |
|
|
|
6ba043 |
The cli_getActions function defines which actions the
|
|
|
6ba043 |
centos-art.sh script is able to perform. Inside
|
|
|
6ba043 |
cli_getActions function, actions are defined combining
|
|
|
6ba043 |
positional arguments and function calls.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
+------------------------------------------------------------------+
|
|
|
6ba043 |
| [centos@host]$ centos-art action 'path/to/dir' --option='value' |
|
|
|
6ba043 |
+------------------------------------------------------------------+
|
|
|
6ba043 |
| ~/bin/centos-art --> ~/artwork/trunk/Scripts/Bash/centos-art.sh |
|
|
|
6ba043 |
+---v-----------------------------------------v--------------------+
|
|
|
6ba043 |
| centos-art.sh |
|
|
|
6ba043 |
+---v---------------------------------v---+
|
|
|
6ba043 |
. | initFunctions.sh | .
|
|
|
6ba043 |
. +---------------------------------+ .
|
|
|
6ba043 |
. | cli_getVariables $@ | .
|
|
|
6ba043 |
. +---v-------------------------v---+ .
|
|
|
6ba043 |
. . | cli_getActions | . .
|
|
|
6ba043 |
. . +---v-----------------v---+ . .
|
|
|
6ba043 |
. . . | function call 1 | . . .
|
|
|
6ba043 |
. . . | function call 2 | . . .
|
|
|
6ba043 |
. . . | function call n | . . .
|
|
|
6ba043 |
. . . +-----------------+ . . .
|
|
|
6ba043 |
. . ........................... . .
|
|
|
6ba043 |
. ................................... .
|
|
|
6ba043 |
...........................................
|
|
|
6ba043 |
|
|
|
6ba043 |
Figure 3.5: The centos-art.sh initialization environment.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.2.1 The identity matching list
|
|
|
6ba043 |
|
|
|
6ba043 |
The identity matching list is used by identity rendering functions to
|
|
|
6ba043 |
define the relation between translation files and identity design
|
|
|
6ba043 |
templates.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.2.2 Adding new features
|
|
|
6ba043 |
|
|
|
6ba043 |
To add new features inside centos-art.sh script, you need to
|
|
|
6ba043 |
set positional arguments and function calls inside
|
|
|
6ba043 |
cli_getActions function for the new function or functions
|
|
|
6ba043 |
required by the new feature you want to add.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.3 Usage
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.3.1 The centos-art <samp>`check'</samp> action
|
|
|
6ba043 |
|
|
|
6ba043 |
This feature is supported through the following command:
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
<samp>`centos-art check'</samp>
|
|
|
6ba043 |
This command verifies paths, symbolic links, installed packages and
|
|
|
6ba043 |
everything your workstation needs in order to run the
|
|
|
6ba043 |
centos-art command correctly.
|
|
|
6ba043 |
|
|
|
6ba043 |
Warning If this is the first time you run
|
|
|
6ba043 |
centos-art command, the appropriate way to execute check
|
|
|
6ba043 |
action is not using the centos-art command, but the absolute
|
|
|
6ba043 |
path to centos-art.sh script instead:
|
|
|
6ba043 |
~/artwork/trunk/Scripts/Bash/centos-art.sh check
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
5fb024 |
|
|
|
5fb024 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.3.2 The centos-art <samp>`search'</samp> action
|
|
|
5fb024 |
|
|
|
6ba043 |
This feature is not supported yet.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
<samp>`centos-art search 'pattern''</samp>
|
|
|
6ba043 |
|
|
|
6ba043 |
Use this command to find directories and files that match exactly the
|
|
|
6ba043 |
posix-regular expression set in <samp>`pattern'</samp> as in <samp>`^pattern$'</samp>.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
<samp>`centos-art search 'pattern1 pattern2 patternN''</samp>
|
|
|
6ba043 |
|
|
|
6ba043 |
Use this command to search repository entries that match pattern1
|
|
|
6ba043 |
or patter2 or patternN as in
|
|
|
6ba043 |
<samp>`'^.*(pattern1|pattern2|patternN).*$''</samp>.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
<samp>`centos-art search 'path/to/dir1 path/to/dir2 path/to/dirN''</samp>
|
|
|
6ba043 |
|
|
|
6ba043 |
Use this command to search repository entries that match
|
|
|
6ba043 |
<samp>`path/to/dir1'</samp> or <samp>`path/to/dir2'</samp>, or
|
|
|
6ba043 |
<samp>`path/to/dirN'</samp> as in
|
|
|
6ba043 |
<samp>`^.*(path/to/dir1|path/to/dir2|path/to/dirN).*$''</samp>.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
5fb024 |
|
|
|
5fb024 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.3.3 The centos-art <samp>`path'</samp> action
|
|
|
5fb024 |
|
|
|
6ba043 |
This feature is not supported yet.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
<samp>`centos-art path 'path/to/dir/' --copy-to='path/to/dir''</samp>
|
|
|
6ba043 |
<samp>`centos-art path 'path/to/dir/' --copy-to='path/to/dir/filename''</samp>
|
|
|
6ba043 |
<samp>`centos-art path 'path/to/dir/' --move-to='path/to/dir''</samp>
|
|
|
6ba043 |
<samp>`centos-art path 'path/to/dir/' --move-to='path/to/dir/filename''</samp>
|
|
|
6ba043 |
<samp>`centos-art path 'path/to/dir/' --remove'</samp>
|
|
|
6ba043 |
|
|
|
4c79b5 |
|
|
|
5fb024 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.3.4 The centos-art <samp>`locale-art'</samp> action
|
|
|
5fb024 |
|
|
|
6ba043 |
This feature is not supported yet.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
<samp>`centos-art locale-art 'path/to/dir' --edit'</samp>
|
|
|
6ba043 |
<samp>`centos-art locale-art 'path/to/dir' --edit='filename''</samp>
|
|
|
6ba043 |
<samp>`centos-art locale-art 'path/to/dir' --list'</samp>
|
|
|
6ba043 |
<samp>`centos-art locale-art 'path/to/dir' --list='filename''</samp>
|
|
|
6ba043 |
|
|
|
5fb024 |
|
|
|
5fb024 |
|
|
|
d06c98 |
|
|
|
6ba043 |
3.34.3.5 The centos-art <samp>`license'</samp> action
|
|
|
6ba043 |
|
|
|
6ba043 |
This feature is supported through the following command:
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
<samp>`centos-art license'</samp>
|
|
|
6ba043 |
Use this command to see a brief description of centos-art
|
|
|
6ba043 |
command its copyright and its license notes.
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
d06c98 |
|
|
|
5fb024 |
3.34.4 See also
|
|
|
4c79b5 |
|
|
|
6ba043 |
|
|
|
d06c98 |
3.37 trunk/Scripts/Bash/Functions
|
|
|
6ba043 |
|
|
|
d06c98 |
3.50 trunk/Scripts/Bash/Locale
|
|
|
6ba043 |
|
|
|
d06c98 |
3.33 trunk/Scripts
|
|
|
6ba043 |
|
|
|
6ba043 |
|
|
|
4c79b5 |
|
|
|
bc3531 |
|
|
|
4c79b5 |
|
|
|
d06c98 |
[ < ]
|
|
|
d06c98 |
[ > ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
[ << ]
|
|
|
d06c98 |
[ Up ]
|
|
|
d06c98 |
[ >> ]
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
<font size="-1">
|
|
|
3b63ff |
This document was generated on October, 22 2010 using texi2html 1.76.
|
|
|
4c79b5 |
</font>
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
</body>
|
|
|
4c79b5 |
</html>
|