Blame Artworks/Documentation/Docbook/Tcar-ug/Scripts/Bash/prepare.docbook

Alain Reguera Delgado 46de3c
<refentry id="scripts-bash-prepare">
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refmeta>
Alain Reguera Delgado 46de3c
        <refentrytitle>prepare</refentrytitle>
Alain Reguera Delgado 46de3c
        <indexterm type="specific-function">
Alain Reguera Delgado 46de3c
            <primary>Standardize configuration tasks inside &TCAR;</primary>
Alain Reguera Delgado 46de3c
        </indexterm>
Alain Reguera Delgado 46de3c
    </refmeta>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refnamediv>
Alain Reguera Delgado 46de3c
        <refname>prepare</refname>
Alain Reguera Delgado 46de3c
        <refpurpose>Standardize configuration tasks inside &TCAR;</refpurpose>
Alain Reguera Delgado 46de3c
    </refnamediv>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsynopsisdiv>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        Assuming this is the very first time you run the
Alain Reguera Delgado 46de3c
        <command>centos-art</command> command, you'll find that there
Alain Reguera Delgado 46de3c
        isn't such a command in your workstation.  This is correct
Alain Reguera Delgado 46de3c
        because you haven't created the symbolic link that makes it
Alain Reguera Delgado 46de3c
        available in your execution path, yet. In order to make the
Alain Reguera Delgado 46de3c
        <command>centos-art</command> command available in the
Alain Reguera Delgado 46de3c
        execution path of your workstation, you need to run the
Alain Reguera Delgado 46de3c
        <command>centos-art.sh</command> script using its absolute
Alain Reguera Delgado 46de3c
        path first:
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <cmdsynopsis>
Alain Reguera Delgado 46de3c
        <command>~/artwork/Scripts/Bash/centos-art.sh</command>
Alain Reguera Delgado 46de3c
        <arg choice="req">prepare</arg>
Alain Reguera Delgado 46de3c
        <arg>-h|--help</arg>
Alain Reguera Delgado 46de3c
        <arg>-q|--quiet</arg>
Alain Reguera Delgado 46de3c
        <arg>--answer-yes</arg>
Alain Reguera Delgado 46de3c
        <arg>--set-environment</arg>
Alain Reguera Delgado 46de3c
        <arg>--see-environment</arg>
Alain Reguera Delgado 46de3c
        <arg>--packages</arg>
Alain Reguera Delgado 46de3c
        <arg>--locales</arg>
Alain Reguera Delgado 46de3c
        <arg>--links</arg>
Alain Reguera Delgado 46de3c
        <arg>--images</arg>
Alain Reguera Delgado 46de3c
        <arg>--manuals</arg>
Alain Reguera Delgado 46de3c
        <arg>--synchronize</arg>
Alain Reguera Delgado 46de3c
    </cmdsynopsis>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        Later, once the <command>centos-art</command> command is
Alain Reguera Delgado 46de3c
        available in your execution path, there is no need for you to
Alain Reguera Delgado 46de3c
        use any absolute path again.  From this time on, you can use
Alain Reguera Delgado 46de3c
        the <command>centos-art</command> command-line interface
Alain Reguera Delgado 46de3c
        directly, as the following example describes:
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <cmdsynopsis>
Alain Reguera Delgado 46de3c
        <command>centos-art</command>
Alain Reguera Delgado 46de3c
        <arg choice="req">prepare</arg>
Alain Reguera Delgado 46de3c
        <arg>-h|--help</arg>
Alain Reguera Delgado 46de3c
        <arg>-q|--quiet</arg>
Alain Reguera Delgado 46de3c
        <arg>--answer-yes</arg>
Alain Reguera Delgado 46de3c
        <arg>--set-environment</arg>
Alain Reguera Delgado 46de3c
        <arg>--see-environment</arg>
Alain Reguera Delgado 46de3c
        <arg>--packages</arg>
Alain Reguera Delgado 46de3c
        <arg>--locales</arg>
Alain Reguera Delgado 46de3c
        <arg>--links</arg>
Alain Reguera Delgado 46de3c
        <arg>--images</arg>
Alain Reguera Delgado 46de3c
        <arg>--manuals</arg>
Alain Reguera Delgado 46de3c
        <arg>--synchronize</arg>
Alain Reguera Delgado 46de3c
    </cmdsynopsis>
Alain Reguera Delgado 46de3c
    </refsynopsisdiv>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsection>
Alain Reguera Delgado 46de3c
    <title>Description</title>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        The <function>prepare</function> function exists to set
Alain Reguera Delgado 46de3c
        environment variables, install/update required packages,
Alain Reguera Delgado 46de3c
        create symbolic links for content reusing, render images based
Alain Reguera Delgado 46de3c
        on available design models and artistic motifs, render
Alain Reguera Delgado 46de3c
        documentation manuals, build language-specific files required
Alain Reguera Delgado 46de3c
        for content localization and anything else needed in order to
Alain Reguera Delgado 46de3c
        make the working copy of &TCAR; ready to be used.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        When no option is provided to <function>prepare</function>
Alain Reguera Delgado 46de3c
        functionality, the <command>centos-art.sh</command> script
Alain Reguera Delgado 46de3c
        uses the <option>--set-environment</option>,
Alain Reguera Delgado 46de3c
        <option>--packages</option>, <option>--locales</option>
Alain Reguera Delgado 46de3c
        <option>--links</option>, <option>--images</option> and
Alain Reguera Delgado 46de3c
        <option>--manuals</option> options, in that order, as default
Alain Reguera Delgado 46de3c
        behaviour.  Otherwise, if you provide any option, the
Alain Reguera Delgado 46de3c
        <command>centos-art.sh</command> script avoids its default
Alain Reguera Delgado 46de3c
        behaviour and executes the <function>prepare</function>
Alain Reguera Delgado 46de3c
        functionality as specified by the options you provided.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        Notice that it is possible for you to execute the
Alain Reguera Delgado 46de3c
        <function>prepare</function> functionality as many times as
Alain Reguera Delgado 46de3c
        you need to.  This is specially useful when you need to keep
Alain Reguera Delgado 46de3c
        syncronized the relation between content produced inside your
Alain Reguera Delgado 46de3c
        working copy and the applications you use outside it. For
Alain Reguera Delgado 46de3c
        example, considering you've added new brushes to or removed
Alain Reguera Delgado 46de3c
        old brushes from your working copy of &TCAR;, the link
Alain Reguera Delgado 46de3c
        information related to those files need to be updated in the
Alain Reguera Delgado 46de3c
        <filename class="directory">~/.gimp-2.2/brushes</filename>
Alain Reguera Delgado 46de3c
        directory too, in a way the addition/deletion change that took
Alain Reguera Delgado 46de3c
        place in your working copy can be reflected there, as well.
Alain Reguera Delgado 46de3c
        The same is true for other similar components like fonts,
Alain Reguera Delgado 46de3c
        patterns and palettes.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    </refsection>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsection>
Alain Reguera Delgado 46de3c
    <title>Usage</title>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        Use the <function>prepare</function> functionality the first
Alain Reguera Delgado 46de3c
        time you download a working copy of &TCAR; or later, to be
Alain Reguera Delgado 46de3c
        sure your workstation has all the components it needs so you
Alain Reguera Delgado 46de3c
        can use the working copy of &TCAR; in all its extension.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </refsection>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsection id="scripts-bash-prepare-options">
Alain Reguera Delgado 46de3c
    <title>Options</title>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        The <command>centos-art prepare</command> command accepts
Alain Reguera Delgado 46de3c
        common options described in 
Alain Reguera Delgado 46de3c
        linkend="scripts-bash-cliref-options" /> and the following
Alain Reguera Delgado 46de3c
        specific options:
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <variablelist>
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--answer-yes</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
       Assume <emphasis>yes</emphasis> to all confirmation requests.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--packages</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        This option verifies packeges required by automation scripts
Alain Reguera Delgado 46de3c
        and installs or updates them as required. When required
Alain Reguera Delgado 46de3c
        packages aren't installed or need to be updated, the
Alain Reguera Delgado 46de3c
        <command>centos-art</command> uses the <command>sudo</command>
Alain Reguera Delgado 46de3c
        and <command>yum</command> to perform either installations or
Alain Reguera Delgado 46de3c
        actualizations tasks.  In both cases, it is required that you
Alain Reguera Delgado 46de3c
        configure the <filename>/etc/sudoers</filename> configuration
Alain Reguera Delgado 46de3c
        file first, as discribed in 
Alain Reguera Delgado 46de3c
        linkend="repo-ws-config-sudoers" />.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--locales</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        This option creates or updates the portable objects (PO) and
Alain Reguera Delgado 46de3c
        machine object (MO) used by <application>gettext</application>
Alain Reguera Delgado 46de3c
        to retrive translated strings related to
Alain Reguera Delgado 46de3c
        <command>centos-art.sh</command> script.  This option calls
Alain Reguera Delgado 46de3c
        the <function>locale</function> functionality of centos-art.sh
Alain Reguera Delgado 46de3c
        with the <option>--update</option> option, as described in
Alain Reguera Delgado 46de3c
        <xref linkend="scripts-bash-locale" />.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--links</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        This option maintains the file relation between your working
Alain Reguera Delgado 46de3c
        copy and configuration files inside your workstation through
Alain Reguera Delgado 46de3c
        symbolic links. When you provide this option, the
Alain Reguera Delgado 46de3c
        <command>centos-art.sh</command> script puts itself into your
Alain Reguera Delgado 46de3c
        system's execution path through its command line interface
Alain Reguera Delgado 46de3c
        <command>centos-art</command> and makes common brushes,
Alain Reguera Delgado 46de3c
        patterns, palettes and fonts inside the working copy,
Alain Reguera Delgado 46de3c
        available to applications like GIMP in order for you to make
Alain Reguera Delgado 46de3c
        use of them without loosing version control over them.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    <caution>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        This option removes all common fonts, brushes, patterns, and
Alain Reguera Delgado 46de3c
        palettes currently installed in your home directory, in order
Alain Reguera Delgado 46de3c
        to create a fresh installation of them all again, using the
Alain Reguera Delgado 46de3c
        working copy as section.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </caution>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
    
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--images</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        This option initializes image files inside the working copy.
Alain Reguera Delgado 46de3c
        When you provide this option, the
Alain Reguera Delgado 46de3c
        <command>centos-art.sh</command> calls the
Alain Reguera Delgado 46de3c
        <function>render</function> functionality to create images
Alain Reguera Delgado 46de3c
        related to each design model available in your working copy,
Alain Reguera Delgado 46de3c
        as described in <xref linkend="scripts-bash-render" />.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--manuals</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
       This option initializes documentation files inside the working
Alain Reguera Delgado 46de3c
       copy. When you provide this option, the
Alain Reguera Delgado 46de3c
       <command>centos-art.sh</command> script calls both the
Alain Reguera Delgado 46de3c
       <function>render</function> and <function>help</function>
Alain Reguera Delgado 46de3c
       functionality to produce DocBook and Texinfo manuals,
Alain Reguera Delgado 46de3c
       respectively.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--see-environment</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
       Print the name and value of some of the environment variables
Alain Reguera Delgado 46de3c
       used by <command>centos-art.sh</command> script as described
Alain Reguera Delgado 46de3c
       in <xref linkend="scripts-bash-environment" />.  
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <varlistentry>
Alain Reguera Delgado 46de3c
    <term><option>--set-environment</option></term>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
       Set default environment values to your personal profile
Alain Reguera Delgado 46de3c
       (<filename>~/.bash_profile</filename>).
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </varlistentry>
Alain Reguera Delgado 46de3c
    </variablelist>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    </refsection>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsection id="scripts-bash-prepare-example">
Alain Reguera Delgado 46de3c
    <title>Examples</title>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        None.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </refsection>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsection id="scripts-bash-prepare-bugs">
Alain Reguera Delgado 46de3c
    <title>Bugs</title>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        To report bugs related to this function, please create a new
Alain Reguera Delgado 46de3c
        ticket 
Alain Reguera Delgado 46de3c
        url="https://projects.centos.org/trac/artwork/newticket?summary=Error%20Standardizing%20Configuration%20Tasks&component=Scripts">here</ulink>
Alain Reguera Delgado 46de3c
        refering the specific problems you found in it. For example,
Alain Reguera Delgado 46de3c
        it would be useful if you copy and paste any error output from
Alain Reguera Delgado 46de3c
        <command>centos-art.sh</command> script.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </refsection>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsection id="scripts-bash-prepare-authors">
Alain Reguera Delgado 46de3c
    <title>Authors</title>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        The following people have worked in this functionality:
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    <itemizedlist>
Alain Reguera Delgado 46de3c
    <listitem>
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        Alain Reguera Delgado <<ulink url="mailto:alain.reguera@gmail.com">alain.reguera@gmail.com</ulink>>, =COPYRIGHT_YEAR_LIST=
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </listitem>
Alain Reguera Delgado 46de3c
    </itemizedlist>
Alain Reguera Delgado 46de3c
    </refsection>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <refsection id="scripts-bash-prepare-licence">
Alain Reguera Delgado 46de3c
    <title>License</title>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        Copyright © =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
 
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        This program is free software; you can redistribute it and/or
Alain Reguera Delgado 46de3c
        modify it under the terms of the GNU General Public License as
Alain Reguera Delgado 46de3c
        published by the Free Software Foundation; either version 2 of
Alain Reguera Delgado 46de3c
        the License, or (at your option) any later version.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
 
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        This program is distributed in the hope that it will be
Alain Reguera Delgado 46de3c
        useful, but WITHOUT ANY WARRANTY; without even the implied
Alain Reguera Delgado 46de3c
        warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Alain Reguera Delgado 46de3c
        PURPOSE.  See the GNU General Public License for more details.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
 
Alain Reguera Delgado 46de3c
    <para>
Alain Reguera Delgado 46de3c
        You should have received a copy of the GNU General Public
Alain Reguera Delgado 46de3c
        License along with this program; if not, write to the Free
Alain Reguera Delgado 46de3c
        Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
Alain Reguera Delgado 46de3c
        USA.
Alain Reguera Delgado 46de3c
    </para>
Alain Reguera Delgado 46de3c
    </refsection>
Alain Reguera Delgado 46de3c
Alain Reguera Delgado 46de3c
</refentry>