Changeset 133


Ignore:
Timestamp:
11/25/19 13:54:21 (5 years ago)
Author:
bduin
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • prextra/prtools_export.m

    r128 r133  
    104104end
    105105
    106 % Create export version in dir2
     106% Create export version in dir2, RD: not needed anymore from 2019
    107107today = 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 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
    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
     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 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
    124124
    125125% Create zip-files
    126126fprintf(1,'    Creating zip files ... \n');
     127exporttemp = prtmp; % RD: starting 2019, no separate exporttemp is needed
    127128cd(exportdir);
    128129copyfile('License.txt',exporttemp,'f');
    129130copyfile('Install_notes.txt',exporttemp,'f');
    130131copyfile('Release_notes.txt',exporttemp,'f');
    131 pfiles = ['prtex' pver_new '.' today '.zip'];
     132exppfiles = ['prtex' pver_new '.' today '.zip'];
    132133mfiles = ['prtools' pver_new '.' today '.zip'];
    133 zip(pfiles,{'prtools','License.txt','Install_notes.txt','Release_notes.txt'},exporttemp);
     134zip(exppfiles,{'prtools','License.txt','Install_notes.txt','Release_notes.txt'},exporttemp);
    134135zip(mfiles,[fullfile(prtmp,'prtools') '/*']);
    135136rmdir(prtmp,'s');
     
    137138if doit
    138139  fprintf(1,'    FTP PRTools zip-file to website ... \n');
    139   % store p-files on website
     140  % store export files on website
    140141  ftpsite = ftp('prtools.tudelft.nl','prlab','0iX7&b3c');
    141142  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.')
    145146  disp('Please check and adjust release notes and known problems on website')
    146147  close(ftpsite)
    147148 
    148149  % 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'));
    151152  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])
    154155  else
    155156    disp(mess);
Note: See TracChangeset for help on using the changeset viewer.