-
Notifications
You must be signed in to change notification settings - Fork 0
/
mtInstallBifLab.m
30 lines (26 loc) · 970 Bytes
/
mtInstallBifLab.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function mtInstallBifLab(permanentFlag)
%mtInstallBifLab
% Adds BifLab folder and subfolders to Matlab path, either for current session
% (permanentFlag = false) or permanently (permanentFlag = true)
%
% INPUTS:
% [permanentFlag]: Optional flag to determine if altered path is saved once
% BifLab folders have been added to it. If FALSE folders are
% added to path just for current session. If TRUE folders are
% added to path permanently. Default is TRUE.
%
% USAGE: mtInstallBifLab(permanentFlag)
% Set permanent flag to default if not supplied
if(nargin < 1)
permanentFlag = true;
end
% Add top-level BifLab folder (where this script is called from)
baseDir = pwd;
addpath(baseDir);
% Explicitly add subfolders to avoid adding hidden folders such as .git
addpath(fullfile(baseDir, 'filters'));
addpath(fullfile(baseDir, 'tests'));
addpath(fullfile(baseDir, 'utils'));
if(permanentFlag)
savepath();
end