Skip to content

Commit

Permalink
Fix for new matlab setup
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentheirendt committed Aug 13, 2017
1 parent 21846eb commit 865f073
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ci/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ elif [ "$ARCH" == "Windows" ]; then
cd "D:\jenkins\workspace\COBRAToolbox-windows\MATLAB_VER\R2016b\label\windows-biocore"
whoami
echo " -- Launching MATLAB --"
nohup "C:\Program Files\Matlab\R2016b\bin\matlab.exe" -logfile output.log -wait -r "restoredefaultpath;matlabrc; cd test; testAll;" &
nohup "C:\Program Files\Matlab\R2016b\bin\matlab.exe" -useStartupFolderPref -logfile output.log -wait -r "cd test; testAll;" & # #fprintf('%s\n', getenv('USERPROFILE')); pwd; initCobraToolbox; exit;
tail -n0 -F --pid=$! output.log 2>/dev/null
fi

Expand Down
12 changes: 6 additions & 6 deletions initCobraToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -167,33 +167,33 @@ function initCobraToolbox()

% temporary disable ssl verification
[status_setSSLVerify, result_setSSLVerify] = system('git config http.sslVerify false');

if status_setSSLVerify ~= 0
fprintf(result_setSSLVerify);
fprintf(strrep(result_setSSLVerify, '\', '\\'));
warning('Your global git configuration could not be changed.');
end

% Update/initialize submodules
[status_gitSubmodule, result_gitSubmodule] = system('git submodule update --init');

if status_gitSubmodule ~= 0
fprintf(result_gitSubmodule);
fprintf(strrep(result_gitSubmodule, '\', '\\'));
error('The submodules could not be initialized.');
end

% reset each submodule
[status_gitReset, result_gitReset] = system('git submodule foreach --recursive git reset --hard');

if status_gitReset ~= 0
fprintf(result_gitReset);
fprintf(strrep(result_gitReset, '\', '\\'));
warning('The submodules could not be reset.');
end

% restore global configuration by unsetting http.sslVerify
[status_setSSLVerify, result_setSSLVerify] = system('git config --unset http.sslVerify');

if status_setSSLVerify ~= 0
fprintf(result_setSSLVerify);
fprintf(strrep(result_setSSLVerify, '\', '\\'));
warning('Your global git configuration could not be restored.');
end

Expand Down

0 comments on commit 865f073

Please sign in to comment.