Skip to content
Snippets Groups Projects
Commit 76644861 authored by Marco Ratto's avatar Marco Ratto
Browse files

Provisions for octave under linux + small cosmethics.

parent 90503684
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,25 @@ dirlist=[];
for indPC=1:length(Parallel),
if ~ispc, %isunix || (~matlab_ver_less_than('7.4') && ismac),
if Parallel(indPC).Local==0,
if exist('OCTAVE_VERSION') % Patch for peculiar behaviour of ssh-ls under Linux.
% It is necessary to capture the ls warning message.
% To do it under the ssh protocol it is necessary to redirect the ls message in a text file.
% The file is 'OctaveStandardOutputMessage.txt' and it is
% saved in the Model directory.
[check, ax]=system(['ssh ',Parallel(indPC).UserName,'@',Parallel(indPC).ComputerName,' ls ',Parallel(indPC).RemoteDirectory,'/',PRCDir,'/',filename, ' 2> OctaveStandardOutputMessage.txt']);
else
[check, ax]=system(['ssh ',Parallel(indPC).UserName,'@',Parallel(indPC).ComputerName,' ls ',Parallel(indPC).RemoteDirectory,'/',PRCDir,'/',filename]);
end
if check ~ 0;
ax=[];
end
else
if exist('OCTAVE_VERSION') % Patch for peculiar behaviour of ls under Linux.
% It is necessary to capture the ls warning message and properly manage the jolly char '*'!
[check ax]=system(['ls ' ,filename, ' 2> OctaveStandardOutputMessage.txt']);
if check ~ 0;
ax=[];
end
......@@ -41,11 +59,12 @@ for indPC=1:length(Parallel),
catch
ax=[];
end
end
end
dirlist = [dirlist, ax];
else
if exist('OCTAVE_VERSION'), % patch for peculiar behaviour of ls under Windows
if exist('OCTAVE_VERSION'), % Patch for peculiar behaviour of ls under Windows.
if Parallel(indPC).Local==0,
ax0=dir(['\\',Parallel(indPC).ComputerName,'\',Parallel(indPC).RemoteDrive,'$\',Parallel(indPC).RemoteDirectory,'\',PRCDir,'\',filename]);
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment