-
Notifications
You must be signed in to change notification settings - Fork 0
/
combiExperimentsLocalHook.m
43 lines (35 loc) · 1.1 KB
/
combiExperimentsLocalHook.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
31
32
33
34
35
36
37
38
39
40
41
42
43
function combiExperimentsLocalHook
% combiExperimentsLocalHook
%
% As part of the setup process, ToolboxToolbox will copy this file to your
% ToolboxToolbox localToolboxHooks directory (minus the "Template" suffix).
% The defalt location for this would be
% ~/localToolboxHooks/combiExperimentsLocalHook.m
%
% Each time you run tbUseProject('combiExperiments'), ToolboxToolbox will
% execute your local copy of this file to do setup.
%
% You should edit your local copy with values that are correct for your
% local machine, for example the output directory location.
%
% Say hello.
projectName = 'combiExperiments';
% Delete any old prefs
if (ispref(projectName))
rmpref(projectName);
end
% Get the DropBox path
if ismac
dbJsonConfigFile = '~/.dropbox/info.json';
fid = fopen(dbJsonConfigFile);
raw = fread(fid,inf);
str = char(raw');
fclose(fid);
val = jsondecode(str);
dropboxBaseDir = val.business.path;
else
error('Need to set up DropBox path finding for non-Mac machine')
end
% Set the prefs
setpref(projectName,'dropboxBaseDir',dropboxBaseDir); % main directory path
end