<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"
          xml:lang="en" xml:id="atomsUpdate">
    <refnamediv>
        <refname>atomsUpdate</refname>
        <refpurpose>Update one or several external modules</refpurpose>
    </refnamediv>
    <!-- ===================================================================== -->
    <!-- Syntax -->
    <!-- ===================================================================== -->
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
            result = atomsUpdate()
            result = atomsUpdate(name)
            result = atomsUpdate(name, section)
        </synopsis>
    </refsynopsisdiv>
    <!-- ===================================================================== -->
    <!-- Parameters -->
    <!-- ===================================================================== -->
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <!-- First input argument -->
            <varlistentry>
                <term>name</term>
                <listitem>
                    <para>
                        1xn character string matrix  : module's technical name
                    </para>
                </listitem>
            </varlistentry>
            <!-- Second input argument -->
            <varlistentry>
                <term>section</term>
                <listitem>
                    <para>
                        This argument controls the list of sections where search
                        modules to update.
                    </para>
                    <para>
                        <literal>section</literal> is a single-string and its value should be :
                    </para>
                    <itemizedlist>
                        <listitem>
                            <para>
                                <literal>"all"</literal>: Modules to remove are searched in both
                                "user" and "allusers" sections.
                            </para>
                        </listitem>
                        <listitem>
                            <para>
                                <literal>"allusers"</literal>: Modules to remove are only searched in
                                the "allusers" section.
                            </para>
                        </listitem>
                        <listitem>
                            <para>
                                <literal>"user"</literal>: Modules to remove are only searched in
                                the "user" section.
                            </para>
                        </listitem>
                    </itemizedlist>
                    <para>
                        If SCI is write accessible, "all" is the default value.
                        Otherwise, the default value is "user".
                    </para>
                </listitem>
            </varlistentry>
            <!-- Outpu argument -->
            <varlistentry>
                <term>result</term>
                <listitem>
                    <para>

                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <!-- ===================================================================== -->
    <!-- Description -->
    <!-- ===================================================================== -->
    <refsection>
        <title>Description</title>
        <para>
            <literal>atomsUpdate</literal> update one or more external modules.
        </para>
    </refsection>
    <!-- ===================================================================== -->
    <!-- Examples -->
    <!-- ===================================================================== -->
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[

atomsSetConfig("Verbose","True");
atomsRepositoryAdd("http://scene1.test.atoms.scilab.org");

// Install toolbox_5
atomsInstall("toolbox_5");

disp(atomsGetInstalled());

// Load the 2nd scenario in which toolbox_4 has been updated:
// toolbox_4 version 1.1 has been added
// (toolbox_4 is a dependency of toolbox_5)

atomsRepositoryDel("http://scene1.test.atoms.scilab.org");
atomsRepositoryAdd("http://scene2.test.atoms.scilab.org");

// Update toolbox_5
atomsUpdate("toolbox_5");
disp(atomsGetInstalled());

// Some cleaning
atomsRepositoryDel("http://scene2.test.atoms.scilab.org");
atomsRemove("toolbox_5");

]]></programlisting>
    </refsection>
    <!-- ===================================================================== -->
    <!-- See also -->
    <!-- ===================================================================== -->
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="atomsInstall">atomsInstall</link>
            </member>
            <member>
                <link linkend="atomsRemove">atomsRemove</link>
            </member>
            <member>
                <link linkend="atomsGetInstalled">atomsGetInstalled</link>
            </member>
        </simplelist>
    </refsection>
    <!-- ===================================================================== -->
    <!-- Authors -->
    <!-- ===================================================================== -->
</refentry>
