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

fad383
<section id="scripts-bash-funref">
688046
688046
    <title>Environment Functions Reference</title>
688046
688046
    <para>
688046
        In addition to environment variables described above, the
688046
        centos-art.sh script makes available the following common
688046
        environment functions once it is executed:
688046
    </para>
688046
688046
    <variablelist>
688046
688046
    <varlistentry>
688046
    <term>
688046
        <cmdsynopsis>
099233
            <command id="cli_checkRepoDirSource" xreflabel="cli_checkRepoDirSource">cli_checkRepoDirSource
099233
            <indexterm type="common-function" zone="cli_checkRepoDirSource">
099233
            <primary>cli_checkRepoDirSource</primary>
099233
            </indexterm>
099233
            </command>
688046
        </cmdsynopsis>
688046
    </term>
688046
    <listitem>
688046
688046
    <para>
688046
        The <function>cli_checkRepoDirSource</function> function
688046
        standardizes the path construction to directories inside it
688046
        the working copy, using absolute paths.  This function
688046
        transforms relative paths passed as non-option arguments to
688046
        <command>centos-art.sh</command> script command-line into
688046
        absolute paths inside the working copy and verifies whether
688046
        they really exist as directories inside the working copy or
688046
        not. If the path provided doesn't exist as directory inside
688046
        the working copy, the script will finish its execution
688046
        immediately with an error message. Otherwise, if the directory
688046
        exists, the variable <varname>ACTIONVAL</varname> is redefined
688046
        with the related absolute path for further use.
688046
    </para>
688046
 
688046
    <para>
688046
        Use the <function>cli_checkRepoDirSource</function> function
688046
        whenever you need to be sure that non-option arguments passed
688046
        to <command>centos-art.sh</command> script command-line will
688046
        always point to directories inside the working copy.
688046
    </para>
688046
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term>
688046
        <cmdsynopsis>
099233
            <command id="cli_expandTMarkers" xreflabel="cli_expandTMarkers">cli_expandTMarkers
099233
            <indexterm type="common-function" zone="cli_expandTMarkers">
099233
                <primary>cli_expandTMarkers</primary>
099233
            </indexterm>
099233
            </command>
a75c6e
            <arg choice="req"><replaceable>LOCATION</replaceable></arg>
a75c6e
        </cmdsynopsis>
a75c6e
    </term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        The <function>cli_expandTMarkers</function> standardizes
a75c6e
        construction of translation markers and their related
a75c6e
        expansion. As convention, translation markers are set inside
a75c6e
        source files (e.g., DocBook, SVG) and expanded inside temporal
bb411a
        instances used to produce final contents. The
bb411a
        <replaceable>LOCATION</replaceable> argument should point to
bb411a
        the temporal file where translation markers expansion takes
bb411a
        place in.
a75c6e
    </para>
a75c6e
    <para>
a75c6e
        Translation markers written in source files must comply the
a75c6e
        <literal>=[A-Z_]+=</literal> regular expression pattern. For
a75c6e
        example, <literal>=UNKNOWN_MARKER=</literal> is a valid
a75c6e
        translation marker without any replacement. To prevent
a75c6e
        <command>centos-art.sh</command> script from expanding
a75c6e
        translation markers, add a backslash (<literal>\</literal>)
a75c6e
        between the first equal sign and the following letter. For
a75c6e
        example, <literal>=\...=</literal> won't be expanded.
a75c6e
    </para>
a75c6e
    <para>
a75c6e
        The <function>cli_expandTMarkers</function> supports the
a75c6e
        following translation markers:
a75c6e
    </para>
a75c6e
    <variablelist>
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\COPYRIGHT_YEAR_LAST=</literal></term>
a75c6e
    <term><literal>=\COPYRIGHT_YEAR=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        These translation markers expand to the last year used in
a75c6e
        copyright notes. For example,
a75c6e
        <literal>=COPYRIGHT_YEAR_LAST=</literal>. 
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\COPYRIGHT_YEAR_LIST=</literal></term>
a75c6e
    <term><literal>=\COPYRIGHT_YEARS_LIST=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation markers expand to the list of years used in
a75c6e
        copyright notes. For example,
a75c6e
        <literal>=COPYRIGHT_YEARS_LIST=</literal>.  The first year
a75c6e
        represents the time we began to work on &TCAR;.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\COPYRIGHT_HOLDER=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the holder used in
a75c6e
        copyright notes. For example,
a75c6e
        <literal>=COPYRIGHT_HOLDER=</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\COPYRIGHT_HOLDER_PREDICATE=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands both the holder and the
a75c6e
        predicate used in copyright notes. For example,
a75c6e
        <literal>=COPYRIGHT_HOLDER_PREDICATE=</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\BRAND=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the brand name used on
a75c6e
        files names and URLs inside &TCAR;.  For example,
a75c6e
        <literal>=BRAND=</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\LICENSE=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the license information
a75c6e
        used in files created by <command>centos-art.sh</command>
a75c6e
        script. For example, <literal>=LICENSE=</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\LICENSE_URL=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the license URL used in
a75c6e
        files created by <command>centos-art.sh</command> script. For
a75c6e
        example, <literal>=LICENSE_URL=</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\THEME=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the theme portion of path
a75c6e
        you are producing through centos-art.sh script. As
a75c6e
        consequence, this translation marker should be used in
a75c6e
        situations where you are producing theme components only.
a75c6e
        This translation marker expands its value by retrieving the
a75c6e
        theme part of the path you provide as non-option argument to
a75c6e
        <command>centos-art.sh</command> script. For example, if you
a75c6e
        provide the path
a75c6e
        <filename>trunk/Identity/Images/Themes/Modern/2/Distro/5</filename>,
a75c6e
        this translation will expand to the
a75c6e
        <literal>Modern/2/</literal> value.
a75c6e
    </para>
a75c6e
    <para>
a75c6e
        In case you need to retrieve the theme name or version
a75c6e
        separately one another, then you can use the
a75c6e
        <literal>=\THEMENAME=</literal> and
a75c6e
        <literal>=\THEMERELEASE=</literal> translation markers,
a75c6e
        respectively. When you use these translation markers, forward
a75c6e
        slashes are removed from result. So, if you provide the path
a75c6e
        <filename>trunk/Identity/Images/Themes/Modern/2/Distro/5</filename>,
a75c6e
        <literal>=\THEMENAME=</literal> will expand to
a75c6e
        <literal>Modern</literal> and
a75c6e
        <literal>=THEMERELEASE=</literal> will expand to
a75c6e
        <literal>2</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\RELEASE=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the current release
a75c6e
        information of your CentOS distribution. By default this
a75c6e
        information is retrieved from
a75c6e
        <filename>/etc/redhat-release</filename>. In case the option
a75c6e
        <option>--release</option> be passed, the value specified with
a75c6e
        it will overwrite the default value and will be this the one
fad383
        used as section for this translation marker to retrieve the
a75c6e
        release information. So, for example, if you are running a
a75c6e
        CentOS-5.8 distribution and no <option>--release</option>
a75c6e
        option is passed to <command>centos-art.sh</command> script,
a75c6e
        this translation marker expands to <literal>5.8</literal>. On
a75c6e
        the other hand, if you are still running a CentOS-5.8
a75c6e
        distribution but provide the <option>--release=6.3</option>
a75c6e
        option to <command>centos-art.sh</command> script, this
a75c6e
        translation marker expands to <literal>6.3</literal> instead.
a75c6e
    </para>
a75c6e
    <para>
a75c6e
        In case you need to retrieve minor and major release numbers
a75c6e
        separately one another, then you can use the
a75c6e
        <literal>=\MINOR_RELEASE=</literal> and
a75c6e
        <literal>=\MAJOR_RELEASE=</literal> translation makers,
a75c6e
        respectively.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\ARCH=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the current architecture of
a75c6e
        your CentOS Distribution. By default this information is
a75c6e
        retrieved from <command>uname -i</command>. In case the option
a75c6e
        <option>--arch</option> be passed, the value specified with it
a75c6e
        will overwrite the default value and will be the one used as
fad383
        section. For example, if the <command>uname -i</command>
a75c6e
        outputs the line <computeroutput>i386</computeroutput>, this
a75c6e
        translation marker will expand to <literal>i386</literal>. On
a75c6e
        the other hand, if you pass the <option>--arch=x86_64</option>
a75c6e
        option to <command>centos-art.sh</command> script, this
a75c6e
        translation marker will expand to <literal>x86_64</literal>
a75c6e
        instead.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\URL=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the URL which points to
a75c6e
        &TC;; home page. For example, <literal>=URL=</literal>.  In
a75c6e
        case you are using the centos-art.sh script in a different
a75c6e
        locale but English (<literal>en_US.UTF-8</literal>), this
a75c6e
        translation marker expands as usual but with the language
a75c6e
        information appended to the end of the string. For example, if
a75c6e
        you are executing the centos-art.shscript for Spanish locale
a75c6e
        (e.g., <literal>es_ES.UTF-8</literal>), this translation
a75c6e
        marker expands to <literal>=URL=es/</literal>.
a75c6e
    </para>
a75c6e
a75c6e
    <para>
a75c6e
        In case you need to expand other URL related to &TC;; domain,
a75c6e
        use translation markers described in 
a75c6e
        linkend="scripts-bash-funref-expandTMarkers-Url" />. Likewise
a75c6e
        =\URL=, translation markers described in 
a75c6e
        linkend="scripts-bash-funref-expandTMarkers-Url" /> does
a75c6e
        append the current language information to the end of the URL
a75c6e
        string based on the locale information you are currently
a75c6e
        executing the <command>centos-art.sh</command> script.
a75c6e
    </para>
a75c6e
a75c6e
    
a75c6e
    <title>URL-related translation markers</title>
a75c6e
    <tgroup cols="2" align="left">
a75c6e
    
a75c6e
        <row>
a75c6e
            <entry>Translation Marker</entry>
a75c6e
            <entry>Expands To</entry>
a75c6e
        </row>
a75c6e
    
a75c6e
a75c6e
    
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_WIKI=</literal></entry>
a75c6e
            <entry><literal>=URL_WIKI=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_LISTS=</literal></entry>
a75c6e
            <entry><literal>=URL_LISTS=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_FORUMS=</literal></entry>
a75c6e
            <entry><literal>=URL_FORUMS=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_MIRRORS=</literal></entry>
a75c6e
            <entry><literal>=URL_MIRRORS=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_DOCS=</literal></entry>
a75c6e
            <entry><literal>=URL_DOCS=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_PROJECTS=</literal></entry>
a75c6e
            <entry><literal>=URL_PROJECTS=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_SVN=</literal></entry>
a75c6e
            <entry><literal>=URL_SVN=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_TRAC=</literal></entry>
a75c6e
            <entry><literal>=URL_TRAC=</literal></entry>
a75c6e
        </row>
a75c6e
        <row>
a75c6e
            <entry><literal>=\URL_PLANET=</literal></entry>
a75c6e
            <entry><literal>=URL_PLANET=</literal></entry>
a75c6e
        </row>
a75c6e
    
a75c6e
    
a75c6e
    </tgroup>
a75c6e
    
a75c6e
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\MAIL_DOCS=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to CentOS documentation
a75c6e
        mailing list address. For example,
a75c6e
        <literal>=MAIL_DOCS=</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\LOCALE=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the current locale
a75c6e
        information used by <command>centos-art.sh</command> script.
a75c6e
        This value is retrieved from the <envar>LANG</envar>
a75c6e
        environment variable and should look like
a75c6e
        <literal>=LOCALE=</literal>.  In case you need to retrieve the
a75c6e
        language and country part separately one another, you can use
a75c6e
        the <literal>=\LOCALE_LL=</literal> and
a75c6e
        <literal>=\LOCALE_CC=</literal>, respectively.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\REPO_TLDIR=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the absolute path to
a75c6e
        <filename class="directory">trunk/</filename> directory inside
a75c6e
        your workstation. For example,
a75c6e
        <literal>/home/al/Projects/CentOS/artwork/trunk</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term><literal>=\REPO_HOME=</literal></term>
a75c6e
    <term><literal>=\TCAR_WORKDIR=</literal></term>
a75c6e
    <listitem>
a75c6e
    <para>
a75c6e
        This translation marker expands to the absolute path of your
a75c6e
        working copy.  For example,
a75c6e
        <literal>/home/al/Projects/CentOS/artwork</literal>.
a75c6e
    </para>
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
    </variablelist>
bb411a
bb411a
    <para>
bb411a
        See also: <xref linkend="cli_getTemporalFile" />
bb411a
    </para>
bb411a
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term>
a75c6e
        <cmdsynopsis>
099233
            <command id="cli_exportFunctions" xreflabel="cli_exportFuncations">cli_exportFunctions
099233
            <indexterm type="common-function" zone="cli_exportFunctions">
099233
                <primary>cli_exportFunctions</primary>
099233
            </indexterm>
099233
            </command>
a75c6e
            <arg choice="req"><replaceable>EXPORTID</replaceable></arg>
a75c6e
        </cmdsynopsis>
a75c6e
    </term>
a75c6e
    <listitem>
a75c6e
    <para>
bb411a
        The <function>cli_exportFunctions</function> function
bb411a
        standardizes the way specific functionalities are exported to
bb411a
        <command>centos-art.sh</command> script execution environment.
bb411a
        The <replaceable>EXPORTID</replaceable> argument points the
bb411a
        specific function initialization file relatively from
bb411a
        <filename>trunk/Scripts/Bash/Functions</filename> directory
bb411a
        on. For example, if we want to export the
bb411a
        <function>render</function> specific functionality, we use the
bb411a
        following construction:
bb411a
    </para>
a021fe
<programlisting>
a021fe
cli_exportFunctions "Render/render"
a021fe
</programlisting>
bb411a
    <para>
bb411a
        In this construction, <literal>Render</literal> with the first
bb411a
        letter in upper case is the name of the directory under
bb411a
        
bb411a
        class="directory">trunk/Scripts/Bash/Functions</filename>
bb411a
        where the specific functionality is stored in, and
bb411a
        <literal>render</literal> with all letters in lower case is
bb411a
        the name of the specific functionality we want to export,
a021fe
        without its extension. This name is also used as suffix to
bb411a
        identify all files related to the specific functionality we
bb411a
        are exporting to <command>centos-art.sh</command> script
bb411a
        execution environment.
a75c6e
    </para>
bb411a
bb411a
    <para>
bb411a
        See also: <xref linkend="cli_unsetFunctions" />
bb411a
    </para>
bb411a
a75c6e
    </listitem>
a75c6e
    </varlistentry>
a75c6e
a75c6e
    <varlistentry>
a75c6e
    <term>
a75c6e
        <cmdsynopsis>
099233
        <command id="cli_getConfigLines" xreflabel="cli_getConfigLines">cli_getConfigLines
099233
        <indexterm type="cli_getConfigLines" zone="cli_getConfigLines">
099233
            <primary>cli_getConfigLines</primary>
099233
        </indexterm>
099233
        </command>
cb3d55
        <arg choice="req"><replaceable>FILE</replaceable></arg>
cb3d55
        <arg choice="req"><replaceable>SECTION</replaceable></arg>
cb3d55
        <arg choice="req"><replaceable>OPTION</replaceable></arg>
cb3d55
        </cmdsynopsis>
cb3d55
    </term>
cb3d55
    <listitem>
cb3d55
    <para>
cb3d55
        The <function>cli_getConfigLines</function> function
cb3d55
        standardizes the way configuration lines are retrieved from
cb3d55
        configuration files. 
cb3d55
    </para>
cb3d55
    
cb3d55
    <para>
cb3d55
        The <function>cli_getConfigLines</function> function accepts
cb3d55
        the following arguments:
cb3d55
    </para>
cb3d55
    
cb3d55
    <variablelist>
cb3d55
    <varlistentry>
cb3d55
    <term><replaceable>FILE</replaceable></term>
cb3d55
    <listitem>
cb3d55
    <para>
cb3d55
        This argument specifies the absolute path to the configuration
cb3d55
        file you want to retrieve configuration lines from. For
cb3d55
        example,
cb3d55
        <quote><filename>${TCAR_WORKDIR}/trunk/Identity/Models/Themes/Default/Distro/5/Anaconda/branding.conf</filename></quote>.
cb3d55
    </para>
cb3d55
    </listitem>
cb3d55
    </varlistentry>
cb3d55
cb3d55
    <varlistentry>
cb3d55
    <term><replaceable>SECTION</replaceable></term>
cb3d55
    <listitem>
cb3d55
    <para>
cb3d55
        This argument specifies the name of the section you want to
cb3d55
        retrieve configuration lines from. For example,
cb3d55
        <quote>symbols</quote> without brackets.
cb3d55
    </para>
cb3d55
    </listitem>
cb3d55
    </varlistentry>
cb3d55
cb3d55
    <varlistentry>
cb3d55
    <term><replaceable>OPTION</replaceable></term>
cb3d55
    <listitem>
cb3d55
    <para>
cb3d55
        This argument specifies the name of the option related to the
cb3d55
        configuration line you want to retrieve. For example,
cb3d55
        <quote>anaconda_header.svgz</quote>.
cb3d55
    </para>
cb3d55
    </listitem>
cb3d55
    </varlistentry>
cb3d55
    </variablelist>
cb3d55
cb3d55
    <para>
cb3d55
        In order for <function>cli_getConfigLines</function> to work
cb3d55
        properly, the configuration files must have a section line
cb3d55
        with the form <literal>[sectionname]</literal> which groups
cb3d55
        several <literal>option = "value"</literal> lines.
cb3d55
        Lines beginning with <literal>#</literal> are ignored and can
cb3d55
        be used for comments.
cb3d55
    </para>
cb3d55
cb3d55
    <example id="cli_getConfigLines-conffile">
cb3d55
    <title>Configuration file used to produce Tcar-fs documentation manual</title>
cb3d55
    <screenshot>
cb3d55
    <screeninfo>Configuration used to produce Tcar-fs documentation manual</screeninfo>
cb3d55
    <mediaobject>
cb3d55
    <textobject>
cb3d55
<programlisting>
cb3d55
[main]
cb3d55
cb3d55
# Specify documentation backend used by documentation manual.
cb3d55
manual_format = "texinfo"
cb3d55
cb3d55
# Specify title style used by sections inside the manual.
cb3d55
manual_section_style = "directory"
cb3d55
cb3d55
# Specify the order used by sections inside the manual.
cb3d55
manual_section_order = "ordered"
cb3d55
cb3d55
[templates]
cb3d55
cb3d55
# Specify relation between template files and section definition files
cb3d55
# inside the manual. 
cb3d55
Chapters/section-functions.texinfo   = "^.+-functions-[[:alnum:]]+\.texinfo$"
cb3d55
Chapters/section.texinfo             = "^.+\.texinfo$"
cb3d55
</programlisting>
cb3d55
</textobject>
cb3d55
</mediaobject>
cb3d55
</screenshot>
cb3d55
    </example>
cb3d55
cb3d55
    <para>
cb3d55
        The section names and option names used inside configuration
cb3d55
        files can be anything. It depends on the use and
cb3d55
        interpretation programmed inside
cb3d55
        <command>centos-art.sh</command> script for specific purposes
cb3d55
        which defines what kind of section and options must exist
cb3d55
        inside a configuration file. For example, consider the
cb3d55
        configuration files used by <function>render</function>
cb3d55
        functionality. They follow the same structure used in
cb3d55
        documentation configuration files but the meaning of their
cb3d55
        sections and options change to fit the specific needs of
cb3d55
        <function>render</function> functionality.
cb3d55
    </para>
cb3d55
cb3d55
    <example id="cli_getConfigLines-conffile-2">
cb3d55
    <title>Configuration file used to produced Anaconda images</title>
cb3d55
    <screenshot>
cb3d55
    <screeninfo>Configuration used to produced Anaconda images</screeninfo>
cb3d55
    <mediaobject>
cb3d55
    <textobject>
cb3d55
<programlisting>
cb3d55
[types]
cb3d55
cb3d55
anaconda_header.svgz   = "Types/White/48/=\BRAND=-5.png:x48+20+20"
cb3d55
first.svgz             = "Types/White/32/=\BRAND=-5.png:x32+30+219"
cb3d55
splash.svgz            = "Types/White/48/=\BRAND=-5-msg.png:x48+30+138"
cb3d55
cb3d55
[symbols]
cb3d55
cb3d55
anaconda_header.svgz   = "Symbols/48/=\BRAND=.png:x48+732+20"
cb3d55
first.svgz             = "Symbols/48/=\BRAND=.png:x48+30+20"
cb3d55
splash.svgz            = "Symbols/48/=\BRAND=.png:x48+30+20"
cb3d55
</programlisting>
cb3d55
</textobject>
cb3d55
</mediaobject>
cb3d55
</screenshot>
cb3d55
    </example>
cb3d55
cb3d55
    <para>
cb3d55
        Use the <function>cli_getConfigLines</function> function when
cb3d55
        you need to retrieve <literal>option = "value"</literal> lines
cb3d55
        from configuration files in a controlled way.
cb3d55
    </para>
cb3d55
cb3d55
    <para>
cb3d55
        See also: <xref linkend="cli_getConfigValue" />
cb3d55
    </para>
cb3d55
cb3d55
    </listitem>
cb3d55
    </varlistentry>
cb3d55
cb3d55
    <varlistentry>
cb3d55
    <term>
cb3d55
        <cmdsynopsis>   
099233
            <command id="cli_getConfigValue" xreflabel="cli_getConfigValue">cli_getConfigValue
099233
            <indexterm type="common-function" zone="cli_getConfigValue">
099233
                <primary>cli_getConfigValue</primary>
099233
            </indexterm>
099233
            </command>
3666ca
            <arg choice="req"><replaceable>FILE</replaceable></arg>
3666ca
            <arg choice="req"><replaceable>SECTION</replaceable></arg>
3666ca
            <arg choice="req"><replaceable>OPTION</replaceable></arg>
cb3d55
        </cmdsynopsis>   
cb3d55
    </term>
cb3d55
    <listitem>
cb3d55
    <para>
3666ca
        The <function>cli_getConfigValue</function> function
3666ca
        standardizes the way option values are retrieved from
3666ca
        configuration files. As convention,
3666ca
        <function>cli_getConfigValue</function> uses the output
3666ca
        produced by <function>cli_getConfigLines</function> as input
3666ca
        to retrieve the option values. As convention, in
3666ca
        <literal>option = "value"</literal> lines, the values
3666ca
        retrieved are always on the right side. The values retrieved
3666ca
        are also output without quotation and translation markers
3666ca
        already expanded.
cb3d55
    </para>
3666ca
3666ca
    <para>
3666ca
        The <function>cli_getConfigValue</function> function accepts
3666ca
        the following arguments:
3666ca
    </para>
3666ca
    
3666ca
    <variablelist>
3666ca
    <varlistentry>
3666ca
    <term><replaceable>FILE</replaceable></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This argument specifies the absolute path to the configuration
3666ca
        file you want to retrieve the value from. For example,
3666ca
        <quote><filename>${TCAR_WORKDIR}/trunk/Identity/Models/Themes/Default/Distro/5/Anaconda/branding.conf</filename></quote>.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry>
3666ca
3666ca
    <varlistentry>
3666ca
    <term><replaceable>SECTION</replaceable></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This argument specifies the name of the section related to the
3666ca
        configuration line you want to retrieve the value from. For
3666ca
        example, <quote>symbols</quote> without brackets.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry>
3666ca
3666ca
    <varlistentry>
3666ca
    <term><replaceable>OPTION</replaceable></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This argument specifies the name of the option you want to
3666ca
        retrieve the value from. For example, in 
3666ca
        linkend="cli_getConfigLines-conffile-2" />, the
3666ca
        <quote><literal>anaconda_header.svgz</literal></quote> option will output the
3666ca
        <quote><literal>Symbols/48/=\BRAND=.png:x48+732+20</literal></quote> value
3666ca
        without quotation and translation markers expanded. So if the
3666ca
        value of <envar>TCAR_BRAND</envar> environment variable is
3666ca
        <quote><literal>centos</literal></quote>, the real value you
3666ca
        get will be
3666ca
        <quote><literal>Symbols/48/centos.png:x48+732+20</literal></quote>.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry>
3666ca
    </variablelist>
3666ca
3666ca
    <para>
3666ca
        Use the <function>cli_getConfigValue</function> function
3666ca
        whenever you want to retrieve values from configuration files
3666ca
        in a controlled way.
3666ca
    </para>
3666ca
3666ca
    <para>
3666ca
        See also: <xref linkend="cli_getConfigLines" />
3666ca
    </para>
3666ca
3666ca
    </listitem>
3666ca
    </varlistentry>
3666ca
3666ca
    <varlistentry>
3666ca
    <term>
3666ca
        <cmdsynopsis>
099233
            <command id="cli_getFilesList" xreflabel="cli_getFilesList">cli_getFilesList
099233
            <indexterm type="common-function" zone="cli_getFilesList">
099233
                <primary>cli_getFilesList</primary>
099233
            </indexterm>
099233
            </command>
3666ca
            <arg choice="opt">--pattern</arg>
3666ca
            <arg choice="opt">--mindepth</arg>
3666ca
            <arg choice="opt">--maxdepth</arg>
3666ca
            <arg choice="opt">--type</arg>
3666ca
            <arg choice="opt">--uid</arg>
3666ca
            <arg choice="req" rep="repeat"><replaceable>LOCATION</replaceable></arg>
3666ca
        </cmdsynopsis>
3666ca
    </term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        The <function>cli_getFilesList</function> standardizes the way
3666ca
        list of files are built inside the
3666ca
        <command>centos-art.sh</command> script. This function outputs
3666ca
        a sorted and unique list of files based on the options and
3666ca
        location provided as argument. This function is an interface
3666ca
        to the <command>find</command> command. Don't use
3666ca
        <command>find</command> command directly inside the
3666ca
        centos-art.sh script. Instead, use the
3666ca
        <function>cli_getFilesList</function> function.
3666ca
    </para>
3666ca
    <para>
3666ca
        The <function>cli_getFilesList</function> accepts the
3666ca
        following arguments:
3666ca
    </para>
3666ca
3666ca
    <variablelist>
3666ca
    <varlistentry>
3666ca
    <term><replaceable>LOCATION</replaceable></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This arguments must be the absolute path to a directory and
3666ca
        specifies where the search of files in any form (e.g.,
3666ca
        directories, links, etc.) will take place in. If
3666ca
        <replaceable>LOCATION</replaceable> isn't a directory, the
3666ca
        script finishes its execution with an error message.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry>
3666ca
    </variablelist>
3666ca
3666ca
    <para>
3666ca
        The <function>cli_getFilesList</function> accepts the
3666ca
        following options:
3666ca
    </para>
3666ca
3666ca
    <variablelist>
3666ca
    <varlistentry>
3666ca
    <term><option>--pattern="<replaceable>REGEX</replaceable>"</option></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This option specifies a posix-egrep type regular expression as
3666ca
        value. This regular expression is applied to path specified in
3666ca
        <replaceable>LOCATION</replaceable> argument. Only file paths
3666ca
        that match this regular expression inside
3666ca
        <replaceable>LOCATION</replaceable> directory will be included
3666ca
        in the final list of files. By default, if this option is not
3666ca
        provided, the
3666ca
        <quote><literal>^/.*[[:alnum:]_/-]+$</literal></quote> regular
3666ca
        expression is used.
3666ca
    </para>
3666ca
    <para>
3666ca
        When you use the <function>cli_getFilesList</function> you
3666ca
        don't need to specified the absolute path of files you want to
3666ca
        look for.  This is something
3666ca
        <function>cli_getFilesList</function> already does for you.
3666ca
        When you use this function, the value you pass as regular
3666ca
        expression isn't the final regular expression used. Instead,
3666ca
        the regular expression you pass is used to build the final
3666ca
        regular expression passed to <command>find</command> command.
3666ca
        The final regular expression passed to find is
3666ca
        <quote><literal>^/.*${PATTERN}$</literal></quote>, where
3666ca
        <literal>${PATTERN}</literal> is the value you passed to
3666ca
        <option>--pattern</option> option as
3666ca
        <replaceable>REGEX</replaceable>.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry> 
3666ca
    <varlistentry>
3666ca
    <term><option>--mindepth="<replaceable>NUMBER</replaceable>"</option></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This option specifies the minimal
3666ca
        <replaceable>NUMBER</replaceable> of levels deep the search
3666ca
        should go under the directory
3666ca
        <replaceable>LOCATION</replaceable> specified. For example, if
3666ca
        you specify <option>--mindepth="2"</option> the search will 
3666ca
        start two levels deep considering the path provided as
fad383
        section. 
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry> 
3666ca
    <varlistentry>
3666ca
    <term><option>--maxdepth="<replaceable>NUMBER</replaceable>"</option></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This option specifies the maximum
3666ca
        <replaceable>NUMBER</replaceable> of levels deep the search
3666ca
        should go under the directory
3666ca
        <replaceable>LOCATION</replaceable> specified. For example, if
3666ca
        you specify <option>--maxdepth="2"</option> the search will
3666ca
        begin in the very same directory path you provided as
3666ca
        <replaceable>LOCATION</replaceable> and stop two levels deep
fad383
        using it as section.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry> 
3666ca
    <varlistentry>
3666ca
    <term><option>--type="<replaceable>STRING</replaceable>"</option></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This option specifies the type of files being searched. This
3666ca
        option accepts the same values the <command>find</command>
3666ca
        <option>-type</option> option does. However, the following
3666ca
        <replaceable>STRING</replaceable> values are the most used
3666ca
        inside the script so far:
3666ca
    </para>
3666ca
3666ca
    <itemizedlist>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        d — directory.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        f — regular file.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </itemizedlist>
3666ca
3666ca
    </listitem>
3666ca
    </varlistentry>
3666ca
3666ca
    <varlistentry>
3666ca
    <term><option>--uid="<replaceable>NUMBER</replaceable>"</option></term>
3666ca
    <listitem>
3666ca
    <para>
3666ca
        This option specifies the numeric user id of the files you
3666ca
        want to search. Only files that match this numeric user id
3666ca
        will be added to the final list of files.
3666ca
    </para>
3666ca
    </listitem>
3666ca
    </varlistentry>
3666ca
    </variablelist>
3666ca
3666ca
    <para>
3666ca
        Use the <function>cli_getFilesList</function> whenever you
3666ca
        need to build list of files for further processing.
3666ca
    </para>
3666ca
    
cb3d55
    </listitem>
cb3d55
    </varlistentry>
cb3d55
cb3d55
    <varlistentry>
cb3d55
    <term>
cb3d55
        <cmdsynopsis>
099233
            <command id="cli_getPathComponent" xreflabel="cli_getPathComponent">cli_getPathComponent
099233
            <indexterm type="common-function" zone="cli_getPathComponent">
099233
                <primary>cli_getPathComponent</primary>
099233
            </indexterm>
099233
            </command>
099233
            <arg>--release</arg>
099233
            <arg>--release-major</arg>
099233
            <arg>--release-minor</arg>
099233
            <arg>--release-pattern</arg>
099233
            <arg>--architecture</arg>
099233
            <arg>--architecture-pattern</arg>
099233
            <arg>--motif</arg>
099233
            <arg>--motif-name</arg>
099233
            <arg>--motif-release</arg>
099233
            <arg>--motif-pattern</arg>
099233
            <arg choice="req"><replaceable>PATH</replaceable></arg>
099233
        </cmdsynopsis>
099233
    </term>
099233
    <listitem>
099233
    <para>
099233
        ...
099233
    </para>
099233
    </listitem>
099233
    </varlistentry>
099233
099233
    <varlistentry>
099233
    <term>
099233
        <cmdsynopsis>
099233
            <command id="cli_synchronizeRepoChanges" xreflabel="cli_synchronizeRepoChanges">cli_synchronizeRepoChanges
099233
            <indexterm type="common-function" zone="cli_synchronizeRepoChanges">
099233
                <primary>cli_syncronizeRepoChanges</primary>
099233
            </indexterm>
099233
            </command>
a75c6e
            <arg choice="req"><replaceable>LOCATION</replaceable></arg>
688046
        </cmdsynopsis>
688046
    </term>
688046
    <listitem>
688046
    <para>
688046
        The <function>cli_synchronizeRepoChanges</function>
688046
        standardizes the way changes are synchronized between the
688046
        working copy and the central repository using
fad383
        <replaceable>LOCATION</replaceable> as section. This
688046
        function is the interface we use inside the
688046
        <command>centos-art.sh</command> script to execute the
688046
        <function>Svn</function> functionality described in 
688046
        linkend="scripts-bash-svn" />.
688046
    </para>
688046
    <para>
688046
        Use <function>cli_synchronizeRepoChanges</function> function
688046
        inside the <command>centos-art.sh</command> script whenever
688046
        you need to synchronize one or more changes at any
688046
        <replaceable>LOCATION</replaceable> inside the working copy.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term>
688046
        <cmdsynopsis>
099233
            <command id="cli_printMessage" xreflabel="cli_printMessage">cli_printMessage
099233
            <indexterm type="common-function" zone="cli_printMessage">
099233
                <primary>cli_printMessage</primary>
099233
            </indexterm>
099233
            </command>
688046
            <arg choice="req"><replaceable>MESSAGE</replaceable></arg>
688046
            <group choice="opt">
688046
            <arg>--as-separator-line</arg>
688046
            <arg>--as-banner-line</arg>
688046
            <arg>--as-cropping-line</arg>
688046
            <arg>--as-tuningup-line</arg>
688046
            <arg>--as-checking-line</arg>
688046
            <arg>--as-combining-line</arg>
688046
            <arg>--as-creating-line</arg>
688046
            <arg>--as-reading-line</arg>
688046
            <arg>--as-savedas-line</arg>
688046
            <arg>--as-linkto-line</arg>
688046
            <arg>--as-movedto-line</arg>
688046
            <arg>--as-validating-line</arg>
688046
            <arg>--as-template-line</arg>
688046
            <arg>--as-configuration-line</arg>
688046
            <arg>--as-palette-line</arg>
688046
            <arg>--as-reponse-line</arg>
688046
            <arg>--as-request-line</arg>
688046
            <arg>--as-selection-line</arg>
688046
            <arg>--as-error-line</arg>
688046
            <arg>--as-toknowmore-line</arg>
688046
            <arg>--as-yesornorequest-line</arg>
688046
            <arg>--as-notrailingnew-line</arg>
688046
            <arg>--as-stdout-line</arg>
688046
            <arg>--as-stderr-line</arg>
688046
            </group>
688046
        </cmdsynopsis>
688046
    </term>
688046
    <listitem>
688046
    <para>
688046
        The <function>cli_printMessage</function> function
688046
        standardizes the way centos-ar.sh scirpt prints messages. By
688046
        default, centos-art.sh script prints all messages to the
688046
        standard output with the exception of those messages printed
688046
        with the <option>--as-stderr-line</option> option, which are
688046
        printed to standard error output instead.
688046
    </para>
688046
688046
    <para>
688046
        The <function>cli_printMessage</function> function requires
286371
        two arguments.  The first argument specifies the
286371
        <replaceable>MESSAGE</replaceable> you want to print and the
286371
        second argument specifies the FORMAT you'll use to print that
286371
        message. Because this function is so used inside the
286371
        centos-art.sh script, it is convenient to provide localization
286371
        to strings passed as <replaceable>MESSAGE</replaceable> using
688046
        <command>gettext</command> contructions when they aren't
688046
        paths.
688046
    </para>
688046
688046
    <para>
688046
        The <function>cli_printMessage</function> function accepts the
688046
        following formats as second argument:
688046
    </para>
688046
688046
    <variablelist>
688046
    <varlistentry>
688046
    <term><option>--as-separator-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format takes the first character passed as
286371
        <replaceable>MESSAGE</replaceable> and repeats it horizontally
286371
        to build a separator line.  Use this format whenever you need
286371
        to create a logical separation between different actions.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term><option>--as-banner-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format takes the string passed as
286371
        <replaceable>MESSAGE</replaceable> and puts it inside two
286371
        horizontal separator lines. Use this format whenever you need
286371
        to print header information for following lines.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term><option>--as-cropping-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been cropped.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term><option>--as-tuningup-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable>
688046
        generally refers to a file inside the repository.  Use this
688046
        format whenever you need to imply the fact that certain file
688046
        has been tuned-up.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-checking-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been checked or verified
286371
        (e.g., through <function>cli_checkFiles</function>
286371
        functionality).
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-combining-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been combined.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-creating-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been created.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-reading-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been read.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-savedas-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been saved.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-linkto-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been linked.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-movedto-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been moved.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-validating-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file has been validated.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-template-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file is a template or design
286371
        model.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-configuration-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file is a configuration file.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-palette-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format is for two columns messages where
286371
        <replaceable>MESSAGE</replaceable> generally refers to a file
286371
        inside the repository.  Use this format whenever you need to
286371
        imply the fact that certain file is a palette of colors.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-response-line</option></term>
688046
    <listitem>
688046
    <para>
688046
        This format adds <literal>--></literal> at the begining of the
286371
        string passed as <replaceable>MESSAGE</replaceable>.  Use this
286371
        format whenever you need to imply the fact that certain file
286371
        is considered part of a response. For example, when you need
286371
        to express that a group of files will take ceratin action, you
286371
        can use this option to doing so.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-request-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format prints <replaceable>MESSAGE</replaceable> without
286371
        trailing new line.  Use this format whenever you need to imply
286371
        a question or yes or no request.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-selection-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format uses each word in
286371
        <replaceable>MESSAGE</replaceable> as item of a selection
688046
        list. Use this format whenever you need to select one of the
286371
        items provided as <replaceable>MESSAGE</replaceable>.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-error-line</option></term>
688046
    <listitem>
688046
    <para>
688046
        This format prints error messages produced by centos-art.sh
688046
        script. It uses the <command>caller</command> built-in command
688046
        to display the line number and the filename where such error
688046
        was triggered. Later, it prints where to find more information
688046
        by using the <option>--as-toknowmore-line</option> option.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    <varlistentry>
688046
    <term><option>--as-toknowmore-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format takes a function name as
286371
        <replaceable>MESSAGE</replaceable> and prints the command you
286371
        can use to find more information about it. When this option is
286371
        passed the script finishes its execution immediately. This
286371
        option is used in combination with
688046
        <option>--as-error-line</option> to finish the script
688046
        execution after an error.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term><option>--as-yesornorequest-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        This format takes a question as
286371
        <replaceable>MESSAGE</replaceable> and reads a yes or no
688046
        answer. When answer is negative, the script finishes its
688046
        execution immediately. When answer is affirmative, the script
688046
        continues its execution normally. 
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term><option>--as-notrailingnew-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        Print <replaceable>MESSAGE</replaceable> without any trailing
286371
        newline.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
688046
    <term><option>--as-stdout-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        Print <replaceable>MESSAGE</replaceable> to standard output.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
    
688046
    <varlistentry>
688046
    <term><option>--as-stderr-line</option></term>
688046
    <listitem>
688046
    <para>
286371
        Print <replaceable>MESSAGE</replaceable> to standard error
286371
        output.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    </variablelist>
688046
    <para>
688046
        Use <function>cli_printMessage</function> function whenever
688046
        you need to print information inside the
688046
        <command>centos-art.sh</command> script.
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    <varlistentry>
bb411a
    <term>
bb411a
        <cmdsynopsis>
099233
            <command id="cli_unsetFunctions" xreflabel="cli_unsetFunctions">cli_unsetFunctions
099233
            <indexterm type="common-function" zone="cli_unsetFunctions">
099233
                <primary>cli_unsetFunctions</primary>
099233
            </indexterm>
099233
            </command>
bb411a
            <arg choice="req"><replaceable>EXPORTID</replaceable></arg>
bb411a
        </cmdsynopsis>
bb411a
    </term>
bb411a
    <listitem>
bb411a
    <para>
bb411a
        ...
bb411a
    </para>
a021fe
    <para>
a021fe
        See also: <xref linkend="cli_exportFunctions" />
a021fe
    </para>
bb411a
    </listitem>
bb411a
    </varlistentry>
bb411a
bb411a
    <varlistentry>
bb411a
    <term>
bb411a
        <cmdsynopsis>
099233
            <command id="cli_getTemporalFile" xreflabel="cli_getTemporalFile">cli_getTemporalFile
099233
            <indexterm type="common-function" zone="cli_unsetFunctions">
099233
                <primary>cli_unsetFunctions</primary>
099233
            </indexterm>
099233
            </command>
bb411a
            <arg choice="req"><replaceable>FILENAME</replaceable></arg>
bb411a
        </cmdsynopsis>
bb411a
    </term>
bb411a
    <listitem>
bb411a
    <para>
bb411a
        ...
bb411a
    </para>
bb411a
    </listitem>
bb411a
    </varlistentry>
bb411a
bb411a
    <varlistentry>
688046
    <term>...</term>
688046
    <listitem>
688046
    <para>
688046
        ...
688046
    </para>
688046
    </listitem>
688046
    </varlistentry>
688046
688046
    </variablelist>
688046
fad383
</section>
688046