Blame Documentation/Models/Docbook/Tcar-ug/Scripts/Bash/varref.docbook

b83358
<sect1 id="scripts-bash-varref">
b83358
b83358
    <title>Environment Variables Reference</title>
b83358
b83358
    <para>
b83358
        The <command>centos-art.sh</command> script uses the following
b83358
        system environment variables:
b83358
    </para>
b83358
b83358
    <variablelist>
b83358
    <varlistentry>
b83358
    <term><envar>PATH</envar></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>PATH</envar> environment variable is specific to
b83358
        the operating system and provides search paths for command
b83358
        execution.  By default, the centos-art.sh script links
b83358
        executable scripts from the 
b83358
        class="directory">~/bin</filename> directory which is one of
b83358
        the locations used as search path in this variable. This is
b83358
        how we create the <command>centos-art</command> command from
b83358
        the <command>centos-art.sh</command> script  inside your
b83358
        working copy.
b83358
    </para>
b83358
b83358
    <para>
b83358
        This variable is not initialized inside the
b83358
        <command>centos-art.sh</command> script. Instead, the value
b83358
        set in <filename>~/.bash_profile</filename> file is used. 
b83358
    </para>
b83358
b83358
    </listitem>
b83358
    </varlistentry>
b83358
b83358
    <varlistentry>
b83358
    <term><envar>EDITOR</envar></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>EDITOR</envar> environment variable is specific to
b83358
        the operating system and provides the path to your default
b83358
        text editor. The <command>centos-art.sh</command> script uses
b83358
        the default text editor to edit subversion pre-commit
b83358
        messages, translation files, documentation files, script
b83358
        files, and similar text-based files.  
b83358
    </para>
b83358
    
b83358
    <para>
b83358
        Possible values for this variable are:
b83358
    </para>
b83358
b83358
    <itemizedlist>
b83358
        <listitem>
b83358
        <para>
b83358
            <filename class="directory">/usr/bin/vim</filename>
b83358
        </para>
b83358
        </listitem>
b83358
b83358
        <listitem>
b83358
        <para>
b83358
        <filename class="directory">/usr/bin/emacs</filename>
b83358
        </para>
b83358
        </listitem>
b83358
b83358
        <listitem>
b83358
        <para>
b83358
            <filename class="directory">/usr/bin/nano</filename>
b83358
        </para>
b83358
        </listitem>
b83358
    </itemizedlist>
b83358
b83358
    <para>
b83358
        In case none of these values is set for the
b83358
        <envar>EDITOR</envar> environment variable inside
b83358
        <filename>~/.bash_profile</filename>, the
b83358
        <command>centos-art.sh</command> script uses 
b83358
        class="directory">/usr/bin/vim</filename> as default text
b83358
        editor. This is the default text editor installed by default
b83358
        in &TC;;. 
b83358
    </para>
b83358
b83358
    </listitem>
b83358
    </varlistentry>
b83358
    <varlistentry>
b83358
    <term><varname>TEXTDOMAIN</varname></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>TEXTDOMAIN</envar> environment variable is specific
b83358
        to the operating system and provides the domain name of that
b83358
        application we are producing translation messages for. This
b83358
        variable, in combination with <envar>TEXTDOMAINDIR</envar>, is
b83358
        used by <application>gettext</application> to find out the
b83358
        location of translation messages.  In the very specific case
b83358
        of <command>centos-art.sh</command> script we use the
b83358
        <literal>centos-art.sh</literal> name as domain name.
b83358
    </para>
b83358
    
b83358
    <para>
b83358
        This variable is initialized inside the
b83358
        <command>centos-art.sh</command> script, so if you set it
b83358
        outside it (e.g., in <filename>~/.bash_profile</filename>) the
b83358
        value you set there will be overwritten by that one set inside
b83358
        <command>centos-art.sh</command> script, once it is executed.
b83358
    </para>
b83358
    </listitem>
b83358
    </varlistentry>
b83358
b83358
    <varlistentry>
b83358
    <term><varname>TEXTDOMAINDIR</varname></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>TEXTDOMAINDIR</envar> environment variable is
b83358
        specific to the operating system and provides the absolute
b83358
        path to the directory containing the translation messages
b83358
        related to that application specified by
b83358
        <envar>TEXTDOMAIN</envar> environment variable.  In the very
b83358
        specific case of <command>centos-art.sh</command> script we
b83358
        use the 
b83358
        class="directory">trunk/Locales/Scripts/Bash</filename>
b83358
        path as default value.
b83358
    </para>
b83358
    <para>
b83358
        This variable is initialized inside the
b83358
        <command>centos-art.sh</command> script, so if you set it
b83358
        outside it (e.g., in <filename>~/.bash_profile</filename>) the
b83358
        value you set there will be overwritten by that one set inside
b83358
        <command>centos-art.sh</command> script, once it is executed.
b83358
    </para>
b83358
    </listitem>
b83358
    </varlistentry>
b83358
b83358
    <varlistentry>
b83358
    <term><envar>TMPDIR</envar></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>TMPDIR</envar> environment variable is specific to
b83358
        the operating system and provides the absolute path to the
b83358
        temporal directory the centos-art.sh script will use along its
b83358
        execution. This variable is defined inside the
b83358
        <command>centos-art.sh</command> script itself using the
b83358
        <command>mktemp</command> command and will be unique on each
b83358
        script execution. Thus, you should be able to run several
b83358
        instances of <command>centos-art.sh</command> script
b83358
        simultaneously without any problem. 
b83358
    </para>
b83358
    
b83358
    <para>
b83358
        Each time you need to store temporal files, do it inside the
b83358
        absolute path specified by this variable.
b83358
    </para>
b83358
b83358
    <para>
b83358
        This variable is initialized inside the
b83358
        <command>centos-art.sh</command> script, so if you set it
b83358
        outside it (e.g., in <filename>~/.bash_profile</filename>) the
b83358
        value you set there will be overwritten by that one set inside
b83358
        <command>centos-art.sh</command> script, once it is executed.
b83358
    </para>
b83358
    </listitem>
b83358
    </varlistentry>
b83358
b83358
    <varlistentry>
b83358
    <term><envar>LANG</envar></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>LANG</envar> environment variable is specific to
b83358
        the operating system and controls the default locale
b83358
        information of it.  The <command>centos-art.sh</command>
b83358
        script use the <envar>LANG</envar> environment variable to
b83358
        determine what language to use for printing output messages
b83358
        from the script itself, as well as the portable objects
b83358
        locations that need to be updated or edited when you localize
b83358
        directory structures inside the working copy of &TCAR;.
b83358
    </para>
b83358
        
b83358
    <para>
b83358
        The <envar>LANG</envar> environment variable is initially set
b83358
        in the installation process of &TC;;, specifically in the
b83358
        <emphasis>Language</emphasis> step.  Generally, there is no
b83358
        need to customize this variable in your personal profile. If
b83358
        you need to change the value of this environment variable do
b83358
        it through the login screen of GNOME Desktop Environment or
b83358
        the <command>system-config-language</command> command, or even
b83358
        resetting the variable before executing the
b83358
        <command>centos-art.sh</command> script.
b83358
    </para>
b83358
    </listitem>
b83358
    </varlistentry>
b83358
b83358
    </variablelist>
b83358
b83358
    <para>
b83358
        In addition to system environment variables described above,
b83358
        the <command>centos-art.sh</command> script adds the following
b83358
        variables inside the <filename>~/.bash_profile</filename> file
b83358
        to control the script behaviour in a per-user level:
b83358
    </para>
b83358
b83358
    <variablelist>
b83358
    <varlistentry>
b83358
    <term><varname>TCAR_WORKDIR</varname></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>TCAR_WORKDIR</envar> environment variable is
b83358
        specific to <command>centos-art.sh</command> script and
b83358
        controls the working copy default location in the workstation.
b83358
        This variable doesn't exist just after installing your
b83358
        workstation. In order for this variable to be customizable you
b83358
        need to configure your workstation first, as described in
b83358
        <xref linkend="repo-ws-config" />.
b83358
    </para>
b83358
    <para>
b83358
        By default, when this variable is not set, the
b83358
        <command>centos-art.sh</command> script assumes the 
b83358
        class="directory">${HOME}/artwork</filename> path as default
b83358
        location for your working copy.
b83358
    </para>
b83358
    </listitem>
b83358
    </varlistentry>
b83358
b83358
    <varlistentry>
b83358
    <term><varname>TCAR_BRAND</varname></term>
b83358
    <listitem>
b83358
    <para>
b83358
        The <envar>TCAR_BRAND</envar> environment variable is specific
b83358
        to <command>centos-art.sh</command> script and controls the
b83358
        brand information that identifies the content produced inside
b83358
        &TCAR;. The brand information is used to give name to some
b83358
        files inside the repository (e.g., see files under 
b83358
        class="directory">trunk/Identity/Models/Brands</filename>
b83358
        directory).
b83358
    </para>
b83358
    <para>
b83358
        By default, this variable takes <literal>centos</literal> as
b83358
        value. In case you want to change it to something else, you
b83358
        should consider the following implications:
b83358
    </para>
b83358
    <itemizedlist>
b83358
    <listitem>
b83358
    <para>
b83358
        The <command>centos-art.sh</command> script will no longer be
b83358
        referred as such. Instead, the
b83358
        <filename>${TCAR_BRAND}-art.sh</filename> name will be used.
b83358
        This implies that you no longer are using the
b83358
        <command>centos-art.sh</command> file we provide as part of
b83358
        &TCAR; and won't be able to commit changes to it. However, if
b83358
        you retain the same logic from
b83358
        <command>centos-art.sh</command> script in
b83358
        <filename>${TCAR_WORKDIR}-art.sh</filename>, you can use
b83358
        common and specific functionalities provided by
b83358
        <command>centos-art.sh</command> script and commit changes to
b83358
        them.
b83358
    </para>
b83358
    </listitem>
b83358
    <listitem>
b83358
    <para>
b83358
        The files stored under 
b83358
        class="directory">trunk/Identity/Models/Brands</filename>
b83358
        should be named using the value of
b83358
        <literal>${TCAR_BRAND}</literal> as reference. If you change
b83358
        the value of this variable, you need to be sure the new value
b83358
        set does coincide with the file names you use to store brand
b83358
        information.
b83358
    </para>
b83358
    </listitem>
b83358
    </itemizedlist>
b83358
    </listitem>
b83358
    </varlistentry>
b83358
    </variablelist>
b83358
b83358
</sect1>