Skip to content
Snippets Groups Projects
Commit 58f75327 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Locally install dates toolbox if not available.

parent 20347875
No related branches found
No related tags found
No related merge requests found
% Check that dates module is in matlab path. % Check that the dates module is available.
try try
initialize_dates_toolbox; initialize_dates_toolbox;
catch catch
message = 'The dates toolbox is not in the Matlab/Octave''s path!'; urlwrite('https://github.com/DynareTeam/dates/archive/master.zip','master.zip');
message = char(message, 'The toolbox can be downloaded here:'); warning('off','MATLAB:MKDIR:DirectoryExists')
message = char(message, ' https://github.com/DynareTeam/dates'); mkdir('../externals')
message = char(message, 'Check that you added the dates/src folder in the path.'); warning('on','MATLAB:MKDIR:DirectoryExists')
disp(' ') unzip('master.zip','../externals')
disp(message) delete('master.zip')
disp(' ') addpath([pwd() '/../externals/dates-master/src'])
error('Please install the dates module or check Matlab/Octave''s path!') initialize_dates_toolbox;
end end
% Get the path to the dseries toolbox. % Get the path to the dseries toolbox.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment