Blob Blame History Raw
<refentry id="scripts-bash-prepare">

    <refmeta>
        <refentrytitle>prepare</refentrytitle>
        <indexterm type="specific-function">
            <primary>Standardize configuration tasks inside &TCAR;</primary>
        </indexterm>
    </refmeta>

    <refnamediv>
        <refname>prepare</refname>
        <refpurpose>Standardize configuration tasks inside &TCAR;</refpurpose>
    </refnamediv>

    <refsynopsisdiv>
    <para>
        Assuming this is the very first time you run the
        <command>centos-art</command> command, you'll find that there
        isn't such a command in your workstation.  This is correct
        because you haven't created the symbolic link that makes it
        available in your execution path, yet. In order to make the
        <command>centos-art</command> command available in the
        execution path of your workstation, you need to run the
        <command>centos-art.sh</command> script using its absolute
        path first:
    </para>

    <cmdsynopsis>
        <command>~/artwork/Scripts/Bash/centos-art.sh</command>
        <arg choice="req">prepare</arg>
        <arg>-h|--help</arg>
        <arg>-q|--quiet</arg>
        <arg>--answer-yes</arg>
        <arg>--set-environment</arg>
        <arg>--see-environment</arg>
        <arg>--packages</arg>
        <arg>--locales</arg>
        <arg>--links</arg>
        <arg>--images</arg>
        <arg>--manuals</arg>
        <arg>--synchronize</arg>
    </cmdsynopsis>

    <para>
        Later, once the <command>centos-art</command> command is
        available in your execution path, there is no need for you to
        use any 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>

    <cmdsynopsis>
        <command>centos-art</command>
        <arg choice="req">prepare</arg>
        <arg>-h|--help</arg>
        <arg>-q|--quiet</arg>
        <arg>--answer-yes</arg>
        <arg>--set-environment</arg>
        <arg>--see-environment</arg>
        <arg>--packages</arg>
        <arg>--locales</arg>
        <arg>--links</arg>
        <arg>--images</arg>
        <arg>--manuals</arg>
        <arg>--synchronize</arg>
    </cmdsynopsis>
    </refsynopsisdiv>

    <refsection>
    <title>Description</title>
    <para>
        The <function>prepare</function> function exists to set
        environment variables, install/update required packages,
        create symbolic links for content reusing, render images based
        on available design models and artistic motifs, render
        documentation manuals, build language-specific files required
        for content localization and anything else needed in order to
        make the working copy of &TCAR; ready to be used.
    </para>

    <para>
        When no option is provided to <function>prepare</function>
        functionality, the <command>centos-art.sh</command> script
        uses the <option>--set-environment</option>,
        <option>--packages</option>, <option>--locales</option>
        <option>--links</option>, <option>--images</option> and
        <option>--manuals</option> options, in that order, 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 provided.
    </para>

    <para>
        Notice that it is possible for you to execute the
        <function>prepare</function> functionality as many 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>

    </refsection>

    <refsection>
    <title>Usage</title>
    <para>
        Use the <function>prepare</function> functionality the first
        time you download a working copy of &TCAR; or later, to be
        sure your workstation has all the components it needs so you
        can use the working copy of &TCAR; in all its extension.
    </para>
    </refsection>

    <refsection id="scripts-bash-prepare-options">
    <title>Options</title>

    <para>
        The <command>centos-art prepare</command> command accepts
        common options described in <xref
        linkend="scripts-bash-cli-commonoptions" /> and the following
        specific options:
    </para>

    <variablelist>
    <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 automation scripts
        and installs or updates them as required. When required
        packages aren't installed or need to be updated, the
        <command>centos-art</command> uses the <command>sudo</command>
        and <command>yum</command> to perform either installations or
        actualizations tasks.  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>--locales</option></term>
    <listitem>
    <para>
        This option creates or updates the portable objects (PO) and
        machine object (MO) used by <application>gettext</application>
        to retrive translated strings related to
        <command>centos-art.sh</command> script.  This option calls
        the <function>locale</function> functionality of centos-art.sh
        with the <option>--update</option> option, as described in
        <xref linkend="scripts-bash-locale" />.
    </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> script 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 section.
    </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> calls the
        <function>render</function> functionality to create images
        related to each design model available in your working copy,
        as described in <xref linkend="scripts-bash-render" />.
    </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 calls both the
       <function>render</function> and <function>help</function>
       functionality to produce DocBook and Texinfo manuals,
       respectively.
    </para>
    </listitem>
    </varlistentry>

    <varlistentry>
    <term><option>--see-environment</option></term>
    <listitem>
    <para>
       Print the name and value of some of the environment variables
       used by <command>centos-art.sh</command> script as described
       in <xref linkend="scripts-bash-environment" />.  
    </para>
    </listitem>
    </varlistentry>

    <varlistentry>
    <term><option>--set-environment</option></term>
    <listitem>
    <para>
       Set default environment values to your personal profile
       (<filename>~/.bash_profile</filename>).
    </para>
    </listitem>
    </varlistentry>
    </variablelist>

    </refsection>

    <refsection id="scripts-bash-prepare-example">
    <title>Examples</title>
    <para>
        None.
    </para>
    </refsection>

    <refsection id="scripts-bash-prepare-bugs">
    <title>Bugs</title>
    <para>
        To report bugs related to this function, please create a new
        ticket <ulink
        url="https://projects.centos.org/trac/artwork/newticket?summary=Error%20Standardizing%20Configuration%20Tasks&amp;component=Scripts">here</ulink>
        refering the specific problems you found in it. For example,
        it would be useful if you copy and paste any error output from
        <command>centos-art.sh</command> script.
    </para>
    </refsection>

    <refsection id="scripts-bash-prepare-authors">
    <title>Authors</title>
    <para>
        The following people have worked in this functionality:
    </para>
    <itemizedlist>
    <listitem>
    <para>
        Alain Reguera Delgado &lt;<ulink url="mailto:alain.reguera@gmail.com">alain.reguera@gmail.com</ulink>&gt;, =COPYRIGHT_YEAR_LIST=
    </para>
    </listitem>
    </itemizedlist>
    </refsection>

    <refsection id="scripts-bash-prepare-licence">
    <title>License</title>

    <para>
        Copyright &copy; =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
    </para>
 
    <para>
        This program is free software; you can redistribute it and/or
        modify it under the terms of the GNU General Public License as
        published by the Free Software Foundation; either version 2 of
        the License, or (at your option) any later version.
    </para>
 
    <para>
        This program is distributed in the hope that it will be
        useful, but WITHOUT ANY WARRANTY; without even the implied
        warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
        PURPOSE.  See the GNU General Public License for more details.
    </para>
 
    <para>
        You should have received a copy of the GNU General Public
        License along with this program; if not, write to the Free
        Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
        USA.
    </para>
    </refsection>

</refentry>