Skip to content

Commit da003da

Browse files
CHG: for discover, scp does not work when requesting cmdout, does not request password and just hangs
1 parent 0b2e4e7 commit da003da

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/m/os/issmscpin.m

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@ function issmscpin(host, login,port,path, packages)
1313
system(['cp ' path '/' packages{i} ' .']);
1414
end
1515
else
16-
if numel(packages)==1,
16+
if numel(packages)==1
1717
fileliststr=packages{1};
1818
else
1919
fileliststr='\{';
20-
for i=1:numel(packages)-1,
20+
for i=1:numel(packages)-1
2121
fileliststr=[fileliststr packages{i} ','];
2222
end
2323
fileliststr=[fileliststr packages{end} '\}'];
2424
end
2525

26-
if port,
27-
[status,cmdout]=system(['scp -P ' num2str(port) ' ' login '@localhost:' path '/' fileliststr ' ./']);
28-
if status ~= 0,
26+
if port
27+
[status]=system(['scp -P ' num2str(port) ' ' login '@localhost:' path '/' fileliststr ' ./']);
28+
if status ~= 0
2929
%List expansion is a bash'ism. Try again with -OT.
3030
[status,cmdout]=system(['scp -OT -P ' num2str(port) ' ' login '@localhost:' path '/' fileliststr ' ./']);
3131
end
3232
else
33-
[status,cmdout]=system(['scp ' login '@' host ':' path '/' fileliststr ' ./']);
34-
if status ~= 0,
33+
[status]=system(['scp ' login '@' host ':' path '/' fileliststr ' ./']);
34+
if status ~= 0
3535
%List expansion is a bash'ism. Try again with -OT.
3636
[status,cmdout]=system(['scp -OT ' login '@' host ':' path '/' fileliststr ' ./']);
3737
end
3838
end
3939

4040
%check scp worked
41-
if status ~= 0,
41+
if status ~= 0
4242
error(['issmscpin error message: ' cmdout])
4343
end
4444
for i=1:numel(packages),

0 commit comments

Comments
 (0)