forked from fh9g12/WT_control
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrmsandbox.m
34 lines (30 loc) · 1.04 KB
/
rmsandbox.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
function rmsandbox()
%rmsandbox Uninstall sandbox
%
% See also: rmsandbox,
% modify_sandbox_path
%
% Copyright 2016 The MathWorks, Inc.
%
% Edits Christopher Szczyglowski, University of Bristol 2020
% - Refactored most of the code into 'modify_sandbox_path'
% Edits Fintan Healy, University of Bristol 2022
% - Refactored to use settings so sandboxes aren't loaded multiple times
name = 'wt_control';
s = settings;
[calling_dir,~,~] = fileparts(mfilename('fullpath'));
if hasGroup(s,"InstalledSandboxes")
if hasGroup(s.InstalledSandboxes,name)
installed_dir = s.InstalledSandboxes.(name).dir.ActiveValue;
if installed_dir ~= calling_dir
warning("Package %s is not at the location %s \n so installation will be skipped.\n Itr is installed at @ %s",...
name,calling_dir,installed_dir);
return
end
else
removeGroup(s.InstalledSandboxes,name);
end
end
sub_directory_to_remove = ["tbx" ; "examples"];
modify_sandbox_path(sub_directory_to_remove, 'remove');
end