Changeset 147 for prextra/webversion.m


Ignore:
Timestamp:
01/08/20 19:13:06 (5 years ago)
Author:
bduin
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • prextra/webversion.m

    r144 r147  
    11%WEBVERSION Set version on website
    22%
    3 %  OUT = WEBVERSION(VERSION,TOOLBOX,FTPSITE,DIR)
     3%  OUT = WEBVERSION(VERSION,TOOLBOX,FTPSITE)
    44%
    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.
    78
    89function out = webversion(version,varargin)
    910
    10 [toolbox,ftpsite,dir] = setdefaults(varargin,'prtools',[],'httpdocs/files');
     11[toolbox,ftpsite] = setdefaults(varargin,'prtools',[]);
    1112if isempty(ftpsite)
    1213  ftpsite = ftp('prtools.tudelft.nl','prlab','0iX7&b3c');
     14  cd(ftpsite,'httpdocs/files')
    1315end
    1416
    1517versionfile = fullfile(fileparts(which(mfilename)),[toolbox '_version.txt']);
    1618fid = fopen(versionfile,'w');
    17 fprintf(fid,version);
     19fprintf(fid,['Version ' version ' ' date]);
    1820fclose(fid);
    19 cd(ftpsite,dir);
    2021s = mput(ftpsite,versionfile);
    2122delete(versionfile)
Note: See TracChangeset for help on using the changeset viewer.