]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/blobdiff - rpp/demos/rpp_build_demos.m
Change license to MIT
[jenkicar/rpp-simulink.git] / rpp / demos / rpp_build_demos.m
index 3acb9e70771a042fb405c484595a2fea4f891a21..bcb69b2924240e8c8b75898f4630f8daed7343a6 100644 (file)
@@ -1,12 +1,37 @@
-% Copyright (C) 2013-2014 Czech Technical University in Prague\r
+% RPP_BUILD_DEMOS Builds all or selected demos in the demo folder\r
+%     RPP_BUILD_DEMOS builds all demos in the demo directory.\r
+%\r
+%     RPP_BUILD_DEMOS DEMO1 DEMO2 ... builds only the demos\r
+%     mentioned on the command line.\r
+%\r
+%     RPP_BUILD_DEMOS(CELLSTR) builds demos specified in the cell\r
+%     array of strings CELLSTR.\r
+\r
+% Copyright (C) 2013-2015 Czech Technical University in Prague\r
 %\r
 % Authors:\r
 %     - Michal Sojka <sojkam1@fel.cvut.cz>\r
 %\r
-% This document contains proprietary information belonging to Czech\r
-% Technical University in Prague. Passing on and copying of this\r
-% document, and communication of its contents is not permitted\r
-% without prior written authorization.\r
+% Permission is hereby granted, free of charge, to any person\r
+% obtaining a copy of this software and associated documentation\r
+% files (the "Software"), to deal in the Software without\r
+% restriction, including without limitation the rights to use,\r
+% copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+% copies of the Software, and to permit persons to whom the\r
+% Software is furnished to do so, subject to the following\r
+% conditions:\r
+\r
+% The above copyright notice and this permission notice shall be\r
+% included in all copies or substantial portions of the Software.\r
+\r
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r
+% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r
+% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r
+% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r
+% OTHER DEALINGS IN THE SOFTWARE.\r
 %\r
 % File : compile_blocks.m\r
 % Abstract:\r
@@ -17,8 +42,14 @@ function rpp_build_demos(varargin)
     d = fullfile(getpref('rpp', 'TargetRoot'), '..', 'demos');\r
     cd(d)\r
 \r
-    if nargin > 0,\r
-        build_demo(varargin{1});\r
+    if nargin == 1 && iscell(varargin{1}),\r
+        for i=1:length(varargin{1}),\r
+            build_demo(varargin{1}{i})\r
+        end\r
+    elseif nargin > 0,\r
+        for i=1:nargin,\r
+            build_demo(varargin{i});\r
+        end\r
     else\r
         for i=dir('*.slx')',\r
             build_demo(i.name);\r