Skip to content

Commit

Permalink
added an autoconfigure option in case configure gets run from a makef…
Browse files Browse the repository at this point in the history
…ile.

git-svn-id: https://svn.csail.mit.edu/locomotion/robotlib/trunk@5494 c9849af7-e679-4ec6-a44e-fc146a885bd3
  • Loading branch information
mjp committed Mar 6, 2013
1 parent dff71af commit 3f0a3ca
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions configure.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function configure
function configure(options)
% Checks dependencies and sets up matlab path.
% Searches the machine for necessary support programs, and generates
% config.mat. If required tools aren't found, it tries to be helpful in
Expand Down Expand Up @@ -214,11 +214,19 @@

% if changes have been made to the matlab path, prompt user with option to
% save the path for future matlab sessions.

if (~strcmp(original_path,path))
a = input('This configure script added some necessary paths to your matlab path.\nWould you like to save your current path for future matlab sessions\nnow (y/n)? ', 's');
if (lower(a(1))=='y')
if (~savepath) disp('MATLAB path successfully saved.'); end
end
if (~savepath) disp('MATLAB path successfully saved.'); end
else
if(exist('options.autoconfig'))
disp('I am running in autoconfig mode, so I will go ahead and save your path...');
if (~savepath) disp('MATLAB path successfully saved.');end
else
a = input('This configure script added some necessary paths to your matlab path.\nWould you like to save your current path for future matlab sessions\nnow (y/n)? ', 's');
if (lower(a(1))=='y')
if (~savepath) disp('MATLAB path successfully saved.'); end
end
end
end

clear util/checkDependency; % makes sure that the persistent variable in the dependency checker gets cleared
Expand Down

0 comments on commit 3f0a3ca

Please sign in to comment.