0001
0002
0003
0004
0005 allforcerun = 1;
0006
0007 init_dir = pwd;
0008
0009 dirlist = dir;
0010 for id = 1:length(dirlist),
0011
0012 if ~strcmp(dirlist(id).name,'.') && ~strcmp(dirlist(id).name,'..') && ~strcmp(dirlist(id).name,'.DS_store') && ~strcmp(dirlist(id).name,'CVS') && dirlist(id).isdir && exist([dirlist(id).name,filesep,'EQUIL']),
0013
0014 dirlist_equil = dir([dirlist(id).name,filesep,'EQUIL']);
0015
0016 for id_equil = 1:length(dirlist_equil),
0017 if ~strcmp(dirlist_equil(id_equil).name,'.') && ~strcmp(dirlist_equil(id_equil).name,'..') && ~strcmp(dirlist_equil(id_equil).name,'.DS_store') && ~strcmp(dirlist_equil(id_equil).name,'CVS') && ~isempty(strfind(dirlist_equil(id_equil).name,'make_equil_')) && ~strcmp(dirlist_equil(id_equil).name(1),'.'),
0018 equilname = dirlist_equil(id_equil).name(12:end-2);
0019 if ~exist([dirlist(id).name,filesep,'EQUIL',filesep,'EQUIL_',equilname,'.mat'],'file') || allforcerun,
0020 cd([dirlist(id).name,filesep,'EQUIL']),
0021 eval(dirlist_equil(id_equil).name(1:end-2));
0022 cd(init_dir)
0023 if allforcerun
0024 disp([' - ',dirlist(id).name,filesep,'EQUIL',filesep,'EQUIL_',equilname,'.mat is build (overwritten)']);
0025 else
0026 disp([' - ',dirlist(id).name,filesep,'EQUIL',filesep,'EQUIL_',equilname,'.mat is build']);
0027 end
0028 else
0029 disp([' - ',dirlist(id).name,filesep,'EQUIL',filesep,'EQUIL_',equilname,'.mat is already build']);
0030 end
0031 end
0032 end
0033
0034 dirlist_fluct = dir([dirlist(id).name,filesep,'FLUCT']);
0035
0036 for id_fluct = 1:length(dirlist_fluct),
0037 if ~strcmp(dirlist_fluct(id_fluct).name,'.') && ~strcmp(dirlist_fluct(id_fluct).name,'..') && ~strcmp(dirlist_fluct(id_fluct).name,'.DS_store') && ~strcmp(dirlist_fluct(id_fluct).name,'CVS') && ~isempty(strfind(dirlist_fluct(id_fluct).name,'make_fluct_')) && ~strcmp(dirlist_fluct(id_fluct).name(1),'.'),
0038 fluctname = dirlist_fluct(id_fluct).name(12:end-2);
0039 if ~exist([dirlist(id).name,filesep,'FLUCT',filesep,'FLUCT_',fluctname,'.mat'],'file') || allforcerun,
0040 cd([dirlist(id).name,filesep,'FLUCT']),
0041 eval(dirlist_fluct(id_fluct).name(1:end-2));
0042 cd(init_dir)
0043 if allforcerun
0044 disp([' - ',dirlist(id).name,filesep,'FLUCT',filesep,'FLUCT_',fluctname,'.mat is build (overwritten)']);
0045 else
0046 disp([' - ',dirlist(id).name,filesep,'FLUCT',filesep,'FLUCT_',fluctname,'.mat is build']);
0047 end
0048 else
0049 disp([' - ',dirlist(id).name,filesep,'FLUCT',filesep,'FLUCT_',fluctname,'.mat is already build']);
0050 end
0051 end
0052 end
0053
0054 dirlist_wave = dir([dirlist(id).name,filesep,'WAVE']);
0055
0056 for id_wave = 1:length(dirlist_wave),
0057 if ~strcmp(dirlist_wave(id_wave).name,'.') && ~strcmp(dirlist_wave(id_wave).name,'..') && ~strcmp(dirlist_wave(id_wave).name,'.DS_store') && ~strcmp(dirlist_wave(id_wave).name,'CVS') && ~isempty(strfind(dirlist_wave(id_wave).name,'make_wave_')) && ~strcmp(dirlist_wave(id_wave).name(1),'.'),
0058 wavename = dirlist_wave(id_wave).name(11:end-2);
0059 if ~exist([dirlist(id).name,filesep,'WAVE',filesep,'WAVE_',wavename,'.mat'],'file') || allforcerun,
0060 cd([dirlist(id).name,filesep,'WAVE']),
0061 eval(dirlist_wave(id_wave).name(1:end-2));
0062 cd(init_dir)
0063 if allforcerun
0064 disp([' - ',dirlist(id).name,filesep,'WAVE',filesep,'WAVE_',wavename,'.mat is build (overwritten)']);
0065 else
0066 disp([' - ',dirlist(id).name,filesep,'WAVE',filesep,'WAVE_',wavename,'.mat is build']);
0067 end
0068 else
0069 disp([' - ',dirlist(id).name,filesep,'WAVE',filesep,'WAVE_',wavename,'.mat is already build']);
0070 end
0071 end
0072 end
0073
0074 end
0075 end