Blame Manuals/Tcar-ug/Scripts/Bash/prepare.docbook

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