Changeset 133
- Timestamp:
- 11/25/19 13:54:21 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prextra/prtools_export.m
r128 r133 104 104 end 105 105 106 % Create export version in dir2 106 % Create export version in dir2, RD: not needed anymore from 2019 107 107 today = datestr(date,'ddmmmyy'); 108 exporttemp = fullfile(prtmp,['prtex' pver_new '.' today]);109 mkdir(exporttemp);110 dir1 = fileparts(which('fisherc'));111 dir2 = fullfile(exporttemp,'prtools');112 mkdir(dir2);113 copydirm(dir1,dir2); % copy main dir114 copydirm(fullfile(dir1,'private'),fullfile(dir2,'private'),'all'); % copy private as it is115 copydirm(fullfile(dir1,'@prdataset'),fullfile(dir2,'@prdataset'),'%'); % copy headers only116 copydirm(fullfile(dir1,'@prdatafile'),fullfile(dir2,'@prdatafile'),'%'); % copy headers only117 copydirm(fullfile(dir1,'@prmapping'),fullfile(dir2,'@prmapping'),'%'); % copy headers only118 119 % Generate pcodes 120 fprintf(1,' Generating pcodes ... \n');121 cd(fullfile(dir2,'@prdataset')); pcode(fullfile(dir1,'@prdataset')); % generate pcode in dir2/@dataset122 cd(fullfile(dir2,'@prdatafile')); pcode(fullfile(dir1,'@prdatafile')); % generate pcode in dir2/@datafile123 cd(fullfile(dir2,'@prmapping')); pcode(fullfile(dir1,'@prmapping')); % generate pcode in dir2/@mapping108 % exporttemp = fullfile(prtmp,['prtex' pver_new '.' today]); 109 % mkdir(exporttemp); 110 % dir1 = fileparts(which('fisherc')); 111 % dir2 = fullfile(exporttemp,'prtools'); 112 % mkdir(dir2); 113 % copydirm(dir1,dir2); % copy main dir 114 % copydirm(fullfile(dir1,'private'),fullfile(dir2,'private'),'all'); % copy private as it is 115 % copydirm(fullfile(dir1,'@prdataset'),fullfile(dir2,'@prdataset'),'%'); % copy headers only 116 % copydirm(fullfile(dir1,'@prdatafile'),fullfile(dir2,'@prdatafile'),'%'); % copy headers only 117 % copydirm(fullfile(dir1,'@prmapping'),fullfile(dir2,'@prmapping'),'%'); % copy headers only 118 119 % Generate pcodes. RD: we stopped this in 2019 120 % fprintf(1,' Generating pcodes ... \n'); 121 % cd(fullfile(dir2,'@prdataset')); pcode(fullfile(dir1,'@prdataset')); % generate pcode in dir2/@dataset 122 % cd(fullfile(dir2,'@prdatafile')); pcode(fullfile(dir1,'@prdatafile')); % generate pcode in dir2/@datafile 123 % cd(fullfile(dir2,'@prmapping')); pcode(fullfile(dir1,'@prmapping')); % generate pcode in dir2/@mapping 124 124 125 125 % Create zip-files 126 126 fprintf(1,' Creating zip files ... \n'); 127 exporttemp = prtmp; % RD: starting 2019, no separate exporttemp is needed 127 128 cd(exportdir); 128 129 copyfile('License.txt',exporttemp,'f'); 129 130 copyfile('Install_notes.txt',exporttemp,'f'); 130 131 copyfile('Release_notes.txt',exporttemp,'f'); 131 pfiles = ['prtex' pver_new '.' today '.zip'];132 exppfiles = ['prtex' pver_new '.' today '.zip']; 132 133 mfiles = ['prtools' pver_new '.' today '.zip']; 133 zip( pfiles,{'prtools','License.txt','Install_notes.txt','Release_notes.txt'},exporttemp);134 zip(exppfiles,{'prtools','License.txt','Install_notes.txt','Release_notes.txt'},exporttemp); 134 135 zip(mfiles,[fullfile(prtmp,'prtools') '/*']); 135 136 rmdir(prtmp,'s'); … … 137 138 if doit 138 139 fprintf(1,' FTP PRTools zip-file to website ... \n'); 139 % store p-files on website140 % store export files on website 140 141 ftpsite = ftp('prtools.tudelft.nl','prlab','0iX7&b3c'); 141 142 cd(ftpsite,'httpdocs/files'); 142 mput(ftpsite, pfiles);143 rename(ftpsite, pfiles,'prtools.zip');144 disp(' p-files have been stored on the website.')143 mput(ftpsite,exppfiles); 144 rename(ftpsite,exppfiles,'prtools.zip'); 145 disp('export files have been stored on the website.') 145 146 disp('Please check and adjust release notes and known problems on website') 146 147 close(ftpsite) 147 148 148 149 % backup p-files and m-files 149 fprintf(1,' Storing backups of mfiles and p-files ... \n');150 [s,mess] = copyfile( pfiles,fullfile(exportdir,'prtools_old_export'));150 fprintf(1,' Storing backups of mfiles and export files ... \n'); 151 [s,mess] = copyfile(exppfiles,fullfile(exportdir,'prtools_old_export')); 151 152 if s 152 delete( pfiles);153 disp([' p-files have been backed-up in ' exportdir])153 delete(exppfiles); 154 disp(['export files have been backed-up in ' exportdir]) 154 155 else 155 156 disp(mess);
Note: See TracChangeset
for help on using the changeset viewer.