forked from SINTEF-AppliedCompSci/MRST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.m
30 lines (26 loc) · 754 Bytes
/
startup.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 startup()
run_startup();
dirs = {'autodiff', 'model-io', 'multiscale', 'modules', 'solvers', 'visualization'};
[base_path, fn, fn] = fileparts(mfilename('fullpath')); %#ok
clear fn
for i = 1:numel(dirs)
mrstPath('addroot', fullfile(base_path, dirs{i}));
end
% co2lab repo is organized differently
mrstPath('add', 'co2lab', fullfile(base_path, 'co2lab', 'co2lab'))
run_local();
end
function d = rootdir()
d = fileparts(mfilename('fullpath'));
end
function run_startup()
run(fullfile(rootdir(), 'core', 'startup.m'));
end
function run_local()
do_run_local(fullfile(rootdir(), 'startup_user.m'));
end
function do_run_local(local)
if exist(local, 'file') == 2
run(local);
end
end