In der Zeit vom 27.05.19 16 Uhr bis zum 28.05.19 10 Uhr steht die GitLab Instanz der RWTH Aachen nicht zur Verfügung. Es findet ein Umzug des angeschlossenen Storage Systems statt, so dass in der genannten Zeit keine Repositories angelegt, gelöscht oder verändert werden können. Wir bitten um Ihr Verständnis. // In the time from 27.05.19 16 o'clock to 28.05.19 10 o'clock the GitLab instance of the RWTH Aachen is not available. The connected storage system will be moved so that no repositories can be created, deleted or changed during this time. We ask for your understanding.

Commit 99b927ab authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

bugfix ita_sofa_install

try catch block around the rest of the function. the openstream function seems unnecessary and sometimes gives a handshake error
parent ff429d8e
......@@ -26,33 +26,41 @@ if ~exist(['SOFAstart.m'],'file')
try
% check Internet connection and if url is existing
urljava = java.net.URL(url);
openStream(urljava);
fullpath = fileparts(which('ita_sofa_install.m'));
savePath = [fullpath filesep '..' filesep];
fprintf( 'Cannot find SOFA. Downloading...' );
websave(fullfile(savePath,'sofa.zip'),url);
catch
% url is not existing or computer is not connected to Internet
error(['No Internet connection or, ',url,' does not exist. SOFA cannot be downloaded. Please update download URL.'])
end
try
% unzip
fprintf('.')
unzip(fullfile(savePath,'sofa.zip'),fullfile(savePath,'sofa'));
% delete zip file
fprintf('.\n')
delete(fullfile(savePath,'sofa.zip'))
% add folder to path
addpath(genpath([savePath(1:end-16) 'sofa/API_MO-master/API_MO']));
ita_path_handling();
% compile sofa
SOFAstart('short');
catch
% some error during unzip maybe
error('Installation failed at some point. Try manually unzipping zip file.')
end
fullpath = fileparts(which('ita_sofa_install.m'));
path = [fullpath filesep '..' filesep];
fprintf( 'Cannot find SOFA. Downloading...' );
websave(fullfile(path,'sofa.zip'),url);
% unzip
fprintf('.')
unzip(fullfile(path,'sofa.zip'),fullfile(path,'sofa'));
% delete zip file
fprintf('.\n')
delete(fullfile(path,'sofa.zip'))
% add folder to path
addpath(genpath([path(1:end-16) 'sofa/API_MO-master/API_MO']));
ita_path_handling();
% compile sofa
SOFAstart('short');
end
......
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