Rev | Line | |
---|
[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 |
|
---|
| 8 | function out = webversion(version,varargin)
|
---|
| 9 |
|
---|
| 10 | [toolbox,ftpsite,dir] = setdefaults(varargin,'prtools',[],'httpdocs/files');
|
---|
| 11 | if isempty(ftpsite)
|
---|
| 12 | ftpsite = ftp('prtools.tudelft.nl','prlab','0iX7&b3c');
|
---|
| 13 | end
|
---|
| 14 |
|
---|
| 15 | versionfile = fullfile(fileparts(which(mfilename)),[toolbox '_version.txt']);
|
---|
| 16 | fid = fopen(versionfile,'w');
|
---|
| 17 | fprintf(fid,version);
|
---|
| 18 | fclose(fid);
|
---|
| 19 | cd(ftpsite,dir);
|
---|
| 20 | s = mput(ftpsite,versionfile);
|
---|
| 21 | delete(versionfile)
|
---|
| 22 | if nargout > 1
|
---|
| 23 | out = s;
|
---|
| 24 | end
|
---|
| 25 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.