Commit f26e4c1d authored by jayd1860's avatar jayd1860
Browse files

-- a) Fix setpaths bug in removeFolderContents.m on linux and MAC because the...

-- a) Fix setpaths bug in removeFolderContents.m on linux and MAC because the delimiter for path string is ':' not ';' as it is on Winodws. b) On linux the gitSetBranch.m used to get latest branch revis
parent d91436f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ ii = 1;

cmds{ii,1} = sprintf('cd %s', repoFull); ii = ii+1;
cmds{ii,1} = sprintf('git checkout %s', branch); ii = ii+1;
cmds{ii,1} = sprintf('git pull'); ii = ii+1;

[errs, msgs] = exeShellCmds(cmds, preview, quiet);

+18 −2
Original line number Diff line number Diff line
@@ -158,11 +158,27 @@ fprintf('ADDED search paths for app %s\n', appPaths{1});
% ----------------------------------------------------
function removeSearchPaths(app)
p = path;
p = str2cell_startup(p,';');
if ispc()
    delimiter = ';';
elseif ismac() || isunix()
    delimiter = ':';
end
[~,appname] = fileparts(fileparts(app));
r = version('-release');
msg = sprintf('Removing search paths for %s ...', appname);
h = waitbar(0, msg);
p = str2cell_startup(p, delimiter);
for kk = 1:length(p)
    if mod(kk,100)==0
        waitbar(kk/length(p), h);
    end
    if ~isempty(strfind(lower(p{kk}), 'matlab')) && ~isempty(strfind(p{kk}, r))
        continue;
    end
    if ~isempty(strfind(filesepStandard_startup(p{kk}), app))
        rmpath(p{kk});
    end
end
close(h);
fprintf('REMOVED search paths for app %s\n', app);