view +mpm/checkout.m @ 17:c37f67ccabac

Copy implementations into the MPM class
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 17 Sep 2018 14:39:00 +0200
parents 309cc6c0cd75
children 02c290e2018c
line wrap: on
line source

% Leave project in current folder
function leave(d)
    if ~exist('d', 'var') || isempty(d)
        d = '';
    end

    state = mpm.load_state();

    sp = mpm.subpaths(d);
    for i = 1:length(sp)
        subpath = fullfile(pwd, sp{i});
        rmpath(subpath);
        state.added_paths.remove(subpath);
    end

    mpm.save_state(state);
end