installx13.m 1.35 KB
Newer Older
1
2
3
4
function installx13()

% Installs CENSUS X13 binaries (Windows and Linux).

5
% Copyright (C) 2017-2018 Dynare Team
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%
% This code is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare dseries submodule is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.

Stéphane Adjemian's avatar
Stéphane Adjemian committed
20

21
if ~exist('x13.zip','file')
22
23
24
25
26
    if ( ~isoctave() && verLessThan('matlab', 'R2014b') )
        websave('x13.zip', 'http://www.dynare.org/x13/x13.zip');
    else
        urlwrite('http://www.dynare.org/x13/x13.zip', 'x13.zip');
    end
27
    unzip('x13.zip');
28
    if ismac()
29
        mkdir osx;
30
31
        movefile('binaries/osx/*','./osx');
    elseif isunix()
32
        mkdir linux;
33
34
        movefile('binaries/linux/*','./linux');
    elseif ispc()
35
        mkdir windows;
36
37
38
39
40
        movefile('binaries/windows/*','./windows');
    else
        error('X13 is not available for the current platform!')
    end
    rmdir('binaries', 's');
41
end