annotate +mpm/verify.m @ 30:d9f899b1dfd0

Add status command and make subpathIsActive a static method
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 18 Sep 2018 14:15:23 +0200
parents 02c290e2018c
children 647cd9e354bf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
6c46515ee860 Add function for checking if the currently loaded paths are correct
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
1 % Check if the current proejct settings are correct
6c46515ee860 Add function for checking if the currently loaded paths are correct
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
2 % The right version is in the path
6c46515ee860 Add function for checking if the currently loaded paths are correct
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
3 % The right version is at the top of the path
6c46515ee860 Add function for checking if the currently loaded paths are correct
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4 %
6c46515ee860 Add function for checking if the currently loaded paths are correct
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
5 % Useful to put at the top of some scripts
21
02c290e2018c Refactor ui functions to use the MPM class. Not tested
Jonatan Werpers <jonatan@werpers.com>
parents: 7
diff changeset
6 function verify(d)
6
19c4af287596 Fix default values for relative part
Jonatan Werpers <jonatan@werpers.com>
parents: 5
diff changeset
7 if ~exist('d', 'var') || isempty(d)
21
02c290e2018c Refactor ui functions to use the MPM class. Not tested
Jonatan Werpers <jonatan@werpers.com>
parents: 7
diff changeset
8 d = pwd;
6
19c4af287596 Fix default values for relative part
Jonatan Werpers <jonatan@werpers.com>
parents: 5
diff changeset
9 end
19c4af287596 Fix default values for relative part
Jonatan Werpers <jonatan@werpers.com>
parents: 5
diff changeset
10
21
02c290e2018c Refactor ui functions to use the MPM class. Not tested
Jonatan Werpers <jonatan@werpers.com>
parents: 7
diff changeset
11 m = mpm.MatlabPathManager();
02c290e2018c Refactor ui functions to use the MPM class. Not tested
Jonatan Werpers <jonatan@werpers.com>
parents: 7
diff changeset
12 if ~m.verify(d)
02c290e2018c Refactor ui functions to use the MPM class. Not tested
Jonatan Werpers <jonatan@werpers.com>
parents: 7
diff changeset
13 error('Subpaths are not correctly loaded. Try running mpm.checkin()');
5
6c46515ee860 Add function for checking if the currently loaded paths are correct
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
14 end
6c46515ee860 Add function for checking if the currently loaded paths are correct
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
15 end