source: prextra/webversion.m @ 146

Last change on this file since 146 was 144, checked in by bduin, 5 years ago
File size: 664 bytes
RevLine 
[144]1%WEBVERSION Set version on website
2%
3%  OUT = WEBVERSION(VERSION,TOOLBOX,FTPSITE,DIR)
4%
5%Creates a file TOOLBOX_version.txt containing just the VERSION number in a
6%directory DIR of FTPSITE.
7
8function out = webversion(version,varargin)
9
10[toolbox,ftpsite,dir] = setdefaults(varargin,'prtools',[],'httpdocs/files');
11if isempty(ftpsite)
12  ftpsite = ftp('prtools.tudelft.nl','prlab','0iX7&b3c');
13end
14
15versionfile = fullfile(fileparts(which(mfilename)),[toolbox '_version.txt']);
16fid = fopen(versionfile,'w');
17fprintf(fid,version);
18fclose(fid);
19cd(ftpsite,dir);
20s = mput(ftpsite,versionfile);
21delete(versionfile)
22if nargout > 1
23  out = s;
24end
25
Note: See TracBrowser for help on using the repository browser.