comparison +mpm/check.m @ 6:19c4af287596

Fix default values for relative part
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 10 Sep 2018 16:54:29 +0200
parents 6c46515ee860
children
comparison
equal deleted inserted replaced
5:6c46515ee860 6:19c4af287596
2 % The right version is in the path 2 % The right version is in the path
3 % The right version is at the top of the path 3 % The right version is at the top of the path
4 % 4 %
5 % Useful to put at the top of some scripts 5 % Useful to put at the top of some scripts
6 function check() 6 function check()
7 if ~exist('d', 'var') || isempty(d)
8 d = '';
9 end
10
7 folders = split(path(), pathsep); 11 folders = split(path(), pathsep);
8 12
9 sp = mpm.subpaths(); 13 sp = mpm.subpaths(d);
10 for i = 1:length(sp) 14 for i = 1:length(sp)
11 if ~isAtTop(sp{i}, fullfile(pwd, sp{i}), folders) 15 if ~isAtTop(sp{i}, fullfile(pwd, sp{i}), folders)
12 error('Subpaths are not correctly set. Try running mpm.set()'); 16 error('Subpaths are not correctly set. Try running mpm.set()');
13 end 17 end
14 end 18 end