1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2008 - INRIA - Delphine GASC <delphine.gasc@scilab.org>
3 // Copyright (C) 2009 - DIGITEO - Sylvestre LEDRU <sylvestre.ledru@scilab.org>
4 // Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
6 // This file must be used under the terms of the CeCILL.
7 // This source file is licensed as described in the file COPYING, which
8 // you should have received as part of this distribution. The terms
9 // are also available at
10 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
14 // Installation of a toolbox sub-category
16 function result = atomsInstallCategory(cat, sscat, checkVersionScilab)
19 if (rhs == 2 | rhs == 1 | rhs == 3) then
21 checkVersionScilab = %t
24 // we load the list of all the available toolboxes in the net
25 desc = atomsReadDesc("")
26 [nbTool, m] = size(desc("Toolbox"))
28 catTool = desc("Category")(i)
29 // We watch if this toolbox belong to the asked cat/sscat
30 regularExpression = "/" + cat + " \((\w*, )*" + sscat + "(, \w*)*\)/"
31 // If yes, we install it if it is convenient for the Scilab version
32 if regexp(catTool, regularExpression) <> [] & ((atomsVerifVersionScilab(desc("ScilabVersion")(i)) & checkVersionScilab) | ~checkVersionScilab)
33 // We can't take result = atomsInstall() there is a install error, result = %f
34 atomsInstall(desc("Toolbox")(i));
38 // If we have installed nothing
40 atomsDisplayMessage(_("None of the toolboxes match in this category/sub-category for your version"))
44 error(msprintf(gettext("%s: Wrong number of input arguments: %d to %d expected.\n"),"atomsInstallCategory",1,3))