Commit 67d08340 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed behaviour in case of missing X13 binary...

... Also do not crash dynare_config() if matlab is not able to download the X13 binary.
parent f7d8164a
......@@ -22,8 +22,16 @@ function run(o, basename)
% Print spc file.
basename = o.print();
% Get expected path to X13 binary.
x13b = select_x13_binary();
% Test for the existence of the binary.
if ~exist(x13b, 'file')
error('X13 is not available, so we cannot run the generated spc file.')
end
% Run spc file.
[~, ~] = system(sprintf('%s %s', select_x13_binary(), basename));
[~, ~] = system(sprintf('%s %s', x13b, basename));
o.results.name = basename; % Base name of the generated files.
......
......@@ -78,8 +78,13 @@ end
% Install X13 binaries
opath = pwd();
cd([dseries_src_root '/../externals/x13'])
installx13();
try
cd([dseries_src_root '/../externals/x13'])
installx13();
catch
warning('X13 is not available!')
p(strmatch('/utilities/x13', p, 'exact')) = [];
end
cd(opath);
% Set path
......
......@@ -40,5 +40,5 @@ elseif ispc()
x13_binary = sprintf('%s%s%s%s', x13_binary, '32', filesep(), 'x13.exe');
end
else
error('X13 binary is not yet available for this plateform')
error('X13 binary is not available for this plateform')
end
\ No newline at end of file
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