Ignore:
Timestamp:
06/19/09 08:10:20 (16 years ago)
Author:
Mathieu Morlighem
Message:

added solution as an input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/utils/UpdateArchive/updatearchive.m

    r494 r1018  
    1414%      updatearchive({'ice'});
    1515%      updatearchive({'cielo_serial','cielo_parallel'});
     16%      updatearchive({'ice'},{'prognostic','diagnostic'});
     17
     18%check arguments
     19if (nargin>2)
     20        help updatearchive
     21        error('updatearchive error message: bad usage');
     22end
    1623
    1724%use ISSM_DIR generated by startup.m
     
    2734[status,list]=system('ls -l | grep -v CVS | awk ''{printf("%s|",$9);}'' '); %only works on *nix systems.
    2835list=strsplit(list,'|');
    29 %Go through list of decks, and run the deck updatearchive.m files.
    30 for i=2:length(list)-1,
    31         eval(['cd ' list{i}]);
    32         if nargin==1
    33                 updatearchive(varargin{1});
    34         else
    35                 updatearchive;
     36
     37%Get packages
     38if nargin,
     39        packages=varargin{1};
     40else
     41        packages={'macayeal','ice','cielo_serial','cielo_parallel'};
     42end
     43
     44%Go through list of decks, and run the deck updatearchive.m files package by package.
     45for i=1:length(packages),
     46        for j=2:length(list)-1,
     47                eval(['cd ' list{j}]);
     48                if nargin==2,
     49                        updatearchive(packages(i),varargin(2));
     50                else
     51                        updatearchive(packages(i));
     52                end
     53                cd ..
    3654        end
    37         cd ..
    3855end
Note: See TracChangeset for help on using the changeset viewer.