0001 function lukegitupdate(dkepath,debugmode,link_mode)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 if nargin < 3,
0022 link_mode = NaN;
0023 end
0024 if nargin < 2,
0025 debugmode = 0;
0026 end
0027 if nargin < 1,
0028 dkepath = '';
0029 end
0030
0031 [dkepath] = load_structures_yp('dkepath','','');
0032
0033 if ~exist('dkepath','var'),
0034 dkepath = setpath_luke_jd('',link_mode,0,0,0);
0035 else
0036 dkepath = setpath_luke_jd(dkepath,link_mode,0,0,0);
0037 end
0038
0039 nrem = length(dkepath.remote);
0040
0041 disp (' ')
0042 info_dke_yp(2,'List of remote profiles tagged for git update :')
0043 disp(' ')
0044
0045 flag_gitupdate = false(1,nrem);
0046
0047 for irem = 1:nrem,
0048 if isfield(dkepath.remote(irem),'gitupdate') && ~isempty(dkepath.remote(irem).gitupdate) && dkepath.remote(irem).gitupdate,
0049 flag_gitupdate(irem) = true;
0050 end
0051 end
0052 remote_index = find(flag_gitupdate);
0053 nrem = length(remote_index);
0054
0055 for irem = 1:nrem,
0056 info_dke_yp(4,['#',num2str(irem),' : ',dkepath.profilestr{remote_index(irem)},' for LUKE root : ',dkepath.remote(remote_index(irem)).env.luke_root]);
0057 end
0058 disp(' ')
0059
0060 remlist = input_dke_yp('Please identify profiles to be updated',1:nrem,[1;nrem]);
0061 disp(' ')
0062
0063 remote = dkepath.remote(remote_index(remlist));
0064 nrem = length(remote);
0065
0066 for irem = 1:nrem,
0067 remote(irem).debugmode = debugmode;
0068 end
0069
0070
0071
0072 remotefunctions = {'select_LUKE.m','load_remoteprofiles_jd.m','make_help.m','lukegitupdate.m'};
0073
0074 display_mode = 3;
0075
0076 exclude = {'.git','.mat','~','.mexa64','.mexglx','.mexmaci64','.o','.DS_Store'};
0077
0078 [profilestr,flag] = remotegitupdate(remote,remotefunctions,display_mode,exclude,debugmode);
0079
0080 disp('--------------------------------------')
0081 disp(' GLOBAL RESULTS ')
0082 disp('--------------------------------------')
0083 disp(' ')
0084 disp(' -2 : the remote process failed')
0085 disp(' -1 : the git update process failed')
0086 disp(' 0 : the git update succeeded')
0087 disp(' ')
0088 disp(' Results for : MatTools / MatRemote / MatHelp / LUKE ')
0089 disp(' ')
0090 disp('--------------------------------------')
0091 disp(' ')
0092 disp(' ')
0093 disp(' ')
0094
0095 if length(remotefunctions) >= 1,
0096 flag1 = num2str(flag(:,1));
0097 else
0098 flag1 = 'NaN';
0099 end
0100 if length(remotefunctions) >= 2,
0101 flag2 = num2str(flag(:,2));
0102 else
0103 flag2 = 'NaN';
0104 end
0105 if length(remotefunctions) >= 3,
0106 flag3 = num2str(flag(:,3));
0107 else
0108 flag3 = 'NaN';
0109 end
0110 if length(remotefunctions) >= 4,
0111 flag4 = num2str(flag(:,4));
0112 else
0113 flag4 = 'NaN';
0114 end
0115
0116 for irem = 1:size(flag1,1),
0117 disp([flag1(irem,:),' / ',flag2(irem,:),' / ',flag3(irem,:),' / ',flag4(irem,:),' : ',dkepath.profilestr{remote_index(remlist(irem))}])
0118 end
0119
0120 disp(' ');disp('----------------------------');disp(' ')
0121
0122 if size(flag1,1) < nrem,
0123 for ii = 1:nrem-size(flag1,1)
0124 disp(['WARNING: Git update missing for ',dkepath.profilestr{remote_index(remlist(size(flag1,1)+ii))}])
0125 end
0126 end
0127