Commit 58f75327 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Locally install dates toolbox if not available.

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