Skip to content

Commit

Permalink
Adding Flag to allow skipping Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tpfau committed Jun 26, 2018
1 parent d7a3db8 commit fbda31f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions initCobraToolbox.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function initCobraToolbox()
function initCobraToolbox(updateToolbox)
% _____ _____ _____ _____ _____ |
% / ___| / _ \ | _ \ | _ \ / ___ \ | COnstraint-Based Reconstruction and Analysis
% | | | | | | | |_| | | |_| | | |___| | | The COBRA Toolbox - 2017
Expand Down Expand Up @@ -41,7 +41,10 @@ function initCobraToolbox()
global ENV_VARS;
global gitBashVersion;
global CBT_MISSING_REQUIREMENTS_ERROR_ID;


if ~exist('updateToolbox','var')
updateToolbox = true;
end
% define a base version of gitBash that is tested
gitBashVersion = '2.13.3';

Expand Down Expand Up @@ -533,8 +536,12 @@ function initCobraToolbox()
changeCobraSolver('gurobi', 'ALL', 0);

% check if a new update exists
if ENV_VARS.printLevel && status_curl == 0 && ~isempty(strfind(result_curl, ' 200'))
if ENV_VARS.printLevel && status_curl == 0 && ~isempty(strfind(result_curl, ' 200')) && updateToolbox
updateCobraToolbox(true); % only check
else
if ~updateToolbox && ENV_VARS.printLevel
fprintf('> Checking for available updates ... skipped\n')
end
end

% restore global configuration by unsetting http.sslVerify
Expand Down

0 comments on commit fbda31f

Please sign in to comment.