Changeset 147 for prextra/webversion.m
- Timestamp:
- 01/08/20 19:13:06 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prextra/webversion.m
r144 r147 1 1 %WEBVERSION Set version on website 2 2 % 3 % OUT = WEBVERSION(VERSION,TOOLBOX,FTPSITE ,DIR)3 % OUT = WEBVERSION(VERSION,TOOLBOX,FTPSITE) 4 4 % 5 %Creates a file TOOLBOX_version.txt containing just the VERSION number in a 6 %directory DIR of FTPSITE. 5 %Creates a file TOOLBOX_version.txt containing just the VERSION number on 6 %FTPSITE. FTPSITE should be created by the @FTP package andchanged to the 7 %proper directory. 7 8 8 9 function out = webversion(version,varargin) 9 10 10 [toolbox,ftpsite ,dir] = setdefaults(varargin,'prtools',[],'httpdocs/files');11 [toolbox,ftpsite] = setdefaults(varargin,'prtools',[]); 11 12 if isempty(ftpsite) 12 13 ftpsite = ftp('prtools.tudelft.nl','prlab','0iX7&b3c'); 14 cd(ftpsite,'httpdocs/files') 13 15 end 14 16 15 17 versionfile = fullfile(fileparts(which(mfilename)),[toolbox '_version.txt']); 16 18 fid = fopen(versionfile,'w'); 17 fprintf(fid, version);19 fprintf(fid,['Version ' version ' ' date]); 18 20 fclose(fid); 19 cd(ftpsite,dir);20 21 s = mput(ftpsite,versionfile); 21 22 delete(versionfile)
Note: See TracChangeset
for help on using the changeset viewer.