Mercurial > repos > public > matlab_path_manager
changeset 2:a9795512f33a
Fix naming of function for getting subpaths
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 10 Sep 2018 14:59:21 +0200 |
parents | 2007c2cd566a |
children | ce34182c274e |
files | +mpm/leave.m +mpm/set.m +mpm/subpackages.m +mpm/subpaths.m |
diffstat | 4 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/+mpm/leave.m Mon Sep 10 14:55:47 2018 +0200 +++ b/+mpm/leave.m Mon Sep 10 14:59:21 2018 +0200 @@ -4,7 +4,7 @@ d = pwd; end - sp = project.subpackages(d); + sp = mpm.subpaths(d); for i = 1:length(sp) rmpath(fullfile(pwd, sp{i})); end
--- a/+mpm/set.m Mon Sep 10 14:55:47 2018 +0200 +++ b/+mpm/set.m Mon Sep 10 14:59:21 2018 +0200 @@ -4,7 +4,7 @@ d = pwd; end - sp = project.subpackages(d); + sp = mpm.subpaths(d); for i = 1:length(sp) addpath(fullfile(pwd, sp{i})); end
--- a/+mpm/subpackages.m Mon Sep 10 14:55:47 2018 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -function sp = subpackages(d) - if ~exist('d', 'var') || isempty(d) - d = pwd; - end - - % TODO: Nice error message if file doesn't exist - fstr = fileread('.subpaths'); - sp = splitlines(strtrim(fstr)); -end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+mpm/subpaths.m Mon Sep 10 14:59:21 2018 +0200 @@ -0,0 +1,9 @@ +function sp = subpaths(d) + if ~exist('d', 'var') || isempty(d) + d = pwd; + end + + % TODO: Nice error message if file doesn't exist + fstr = fileread('.subpaths'); + sp = splitlines(strtrim(fstr)); +end