-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstartup.m
21 lines (19 loc) · 911 Bytes
/
startup.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
virmenDir = fileparts(mfilename('fullpath'));
% guiDir = fullfile(virmenDir, 'bin', 'gui');
subDirs = strsplit(genpath(virmenDir), pathsep);
vetoDir = { fullfile(virmenDir, '.git') ...
, fullfile(virmenDir, 'bin', 'gui', 'builtin') ...
, fullfile(virmenDir, 'bin', 'gui', 'icons') ...
, fullfile(virmenDir, 'bin', 'engine', 'GL') ...
, fullfile(virmenDir, 'sensors', 'ADNS') ...
, fullfile(virmenDir, 'database', 'images') ...
};
if ~isempty(which('layoutRoot'))
vetoDir{end+1} = fullfile(virmenDir, 'GUILayout');
end
subDirs( cellfun(@isempty,subDirs) ) = [];
for iVeto = 1:numel(vetoDir)
subDirs( strncmp(subDirs, vetoDir{iVeto}, numel(vetoDir{iVeto})) ) = [];
end
addpath(strjoin(subDirs, pathsep));
clear('virmenDir', 'subDirs', 'vetoDir', 'iVeto');