<sect1 id="scripts-bash-prepare">
<title>Standardizing Configuration Tasks</title>
<para>
The <function>prepare</function> functionality is the
interface the <command>centos-art.sh</command> script provides
to standardize the final configuration stuff your workstation
needs, once the working copy of &TCAR; has been downloaded
inside it already.
</para>
<para>
Assuming this is the very first time you run the
<command>centos-art.sh</command> script, you'll find that
it isn't found in your workstation. This is correct because
you haven't created the symbolic link that make it available
in the execution path, yet. In order to make the
<command>centos-art.sh</command> script available in the
execution path of your workstation, you need to run it using
its absolute path first:
</para>
<screen>~/Projects/artwork/trunk/Scripts/Bash/centos-art.sh prepare [OPTIONS]</screen>
<para>
Later, once the <command>centos-art.sh</command> script is
available in the execution path of your system, there is no
need for you to use the absolute path again. From this time
on, you can use the <command>centos-art</command> command-line
interface directly, as the following example describes:
</para>
<screen>centos-art prepare [OPTIONS]</screen>
<para>
The <function>prepare</function> functionality accepts the
following options:
</para>
<variablelist>
<varlistentry>
<term><option>--quiet</option></term>
<listitem>
<para>
Supress all output messages except error messages. When this
option is passed, all confirmation requests are supressed and
a possitive answer is assumed for them, just as if the
<option>--answer-yes</option> option whould have been provided.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--answer-yes</option></term>
<listitem>
<para>
Assume <emphasis>yes</emphasis> to all confirmation requests.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--packages</option></term>
<listitem>
<para>
This option verifies packeges required by
<command>centos-art.sh</command> script. installs or updates
required packages. When required packages aren't installed,
this option uses <command>sudo yum install</command> command
to perform the installation task. When required packages are
installed, this option uses <command>sudo yum update</command>
to update them, if there is any related actualization to be
applied on. In both cases, it is required that you configure
the <filename>/etc/sudoers</filename> configuration file
first, as discribed in <xref linkend="repo-ws-config-sudoers" />.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--links</option></term>
<listitem>
<para>
This option maintains the file relation between your working
copy and configuration files inside your workstation through
symbolic links. When you provide this option, the
<command>centos-art.sh</command> puts itself into your
system's execution path through its command line interface
<command>centos-art</command> and makes common brushes,
patterns, palettes and fonts inside the working copy,
available to applications like GIMP in order for you to make
use of them without loosing version control over them.
</para>
<caution>
<para>
This option removes all common fonts, brushes, patterns, and
palettes currently installed in your home directory, in order
to create a fresh installation of them all again, using the
working copy as reference.
</para>
</caution>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--images</option></term>
<listitem>
<para>
This option initializes image files inside the working copy.
When you provide this option, the
<command>centos-art.sh</command> scripts renders image files
from all design models available in the working copy. This
step is required in order to satisfy file dependencies among
different components inside the working copy.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--manuals</option></term>
<listitem>
<para>
This option initializes documentation files inside the working
copy. When you provide this option, the
<command>centos-art.sh</command> script renders all
documentation manuals from their related source files to
different output formats, so you can read them nicely.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--environment</option></term>
<listitem>
<para>
Print the name and value of some of the environment variables
used by <command>centos-art.sh</command> scripts as described
in <xref linkend="scripts-bash-prepare-envar" />.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
When no option is provided to <function>prepare</function>
functionality, the <command>centos-art.sh</command> script
uses the <option>--packages</option>,
<option>--links</option>, <option>--images</option> and
<option>--manuals</option> options as default behaviour.
Otherwise, if you provide any option, the
<command>centos-art.sh</command> script avoids its default
behaviour and executes the <function>prepare</function>
functionality as specified by the options you provides.
</para>
<para>
Notice that it is possible for you to execute the
<function>prepare</function> functionality as much times as
you need to. This is specially useful when you need to keep
syncronized the relation between content produced inside your
working copy and the applications you use outside it. For
example, considering you've added new brushes to or removed
old brushes from your working copy of &TCAR;, the link
information related to those files need to be updated in the
<filename class="directory">~/.gimp-2.2/brushes</filename>
directory too, in a way the addition/deletion change that took
place in your working copy can be reflected there, as well.
The same is true for other similar components like fonts,
patterns and palettes.
</para>
<sect2 id="scripts-bash-prepare-envar">
<title>Environment Variables</title>
<para>
There are some environment variables that you can customize to
fit your personal needs (e.g., default text editor, default
locale information, default time zone representation, etc.).
To customize these variables you need to edit your personal
profile (i.e., <filename
class="directory">~/.bash_profile</filename>) and set the
redefinition there. Notice that you may need to logout and
then do login again in order for the new variable values to
take effect.
</para>
<sect3>
<title>Default text editor</title>
<para>
The default text editor information is controlled by the
<envar>EDITOR</envar> environment variable. The
<command>centos-art.sh</command> script uses the default text
editor to edit subversion pre-commit messages, translation
files, documentation files, script files, and similar
text-based files.
</para>
<para>
If <envar>EDITOR</envar> environment variable is not set,
<command>centos-art.sh</command> script uses <filename
class="directory">/usr/bin/vim</filename> as default text
editor. Otherwise, the following values are recognized by
<command>centos-art.sh</command> script:
<itemizedlist>
<listitem>
<para>
<filename class="directory">/usr/bin/vim</filename>
</para>
</listitem>
<listitem>
<para>
<filename class="directory">/usr/bin/emacs</filename>
</para>
</listitem>
<listitem>
<para>
<filename class="directory">/usr/bin/nano</filename>
</para>
</listitem>
</itemizedlist>
</para>
<para>
If no one of these values is set in the <envar>EDITOR</envar>
environment variable, the <command>centos-art.sh</command>
script uses <filename
class="directory">/usr/bin/vim</filename> text editor, the one
installed by default in &TCD;.
</para>
</sect3>
<sect3>
<title>Default locale information</title>
<para>
The default locale information is controlled by the
<envar>LANG</envar> environment variable. This variable is
initially set in the installation process of &TCD;,
specifically in the <emphasis>Language</emphasis> step.
Generally, there is no need to customize this variable in your
personal profile. If you need to change the value of this
environment variable do it through the login screen of GNOME
Desktop Environment or the
<command>system-config-language</command> command.
</para>
<para>
The <command>centos-art.sh</command> script uses the
<envar>LANG</envar> environment variable to determine what
language to use for printing output messages from the script
itself, as well as the portable objects locations that need to
be updated or edited when you localize directory structures
inside the working copy of &TCAR;.
</para>
</sect3>
<sect3>
<title>Default time zone representation</title>
<para>
The time zone representation is a time correction applied to
the system time (stored in the BIOS clock) based on your
country location. This correction is specially useful to
distributed computers around the world that work together and
need to be syncronized in time to know when things happened.
</para>
<para>
&TCAR; is made of one server and several workstations spread
around the world. In order for all these workstations to know
when changes in the server took place, it is required that
they all set their system clocks to use the same time
information (e.g., through UTC (Coordinated Universal Time))
and set the time correction for their specific countries in
the operating system. Otherwise, it would be difficult to
know when something exactly happened.
</para>
<para>
Generally, setting the time information is a straight-forward
task and configuration tools provided by &TCD; do cover time
correction for most of the countries around the world.
However, if you need a time precision not provided by any of
the date and time configuration tools provided by &TCD; then,
you need to customize the <envar>TZ</envar> environment
variable in your personal profile to correct the time
information by yourself. The format of <envar>TZ</envar>
environment variable is described in <code>tzset(3)</code>
manual page.
</para>
</sect3>
</sect2>
</sect1>