Changeset 26744 for issm/trunk/src/m/os
- Timestamp:
- 12/22/21 10:39:44 (3 years ago)
- Location:
- issm/trunk
- Files:
-
- 9 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 25837-25866,25868-25993,25995-26330,26332-26733,26736-26739,26741
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/os/issmscpin.m
r23189 r26744 18 18 %if hostname and host are the same, do a simple copy 19 19 if strcmpi(hostname,host), 20 21 for i=1:numel(packages), 20 for i=1:numel(packages), 22 21 success=copyfile([path '/' packages{i}]); %keep going, even if success=0 23 22 end 24 25 23 else 26 27 if ispc(), 24 if ispc & ~ismingw, 28 25 %use the putty project pscp.exe: it should be in the path. 29 26 -
issm/trunk/src/m/os/issmscpin.py
r24313 r26744 1 from socket import gethostname2 import subprocess3 1 import os 4 2 import shutil 5 import MatlabFuncs as m 3 import subprocess 4 from MatlabFuncs import * 6 5 7 6 8 7 def issmscpin(host, login, port, path, packages): 9 """ 10 ISSMSCPIN get packages from host, using scp on unix, and pscp on windows 11 usage: issmscpin(host, packages, path) 8 """ISSMSCPIN get packages from host, using scp on unix, and pscp on windows 9 10 Usage: 11 issmscpin(host, packages, path) 12 12 """ 13 13 14 14 #first get hostname 15 hostname = gethostname()15 hostname = oshostname() 16 16 #first be sure packages are not in the current directory, this could conflict with pscp on windows. 17 17 #remove warnings in case the files do not exist … … 29 29 pass 30 30 else: 31 if m.ispc():31 if ispc(): 32 32 #use the putty project pscp.exe: it should be in the path. 33 33 #get ISSM_DIR variable -
issm/trunk/src/m/os/issmscpout.m
r15396 r26744 9 9 hostname=oshostname(); 10 10 11 %are we dis -allowing symbolic links?11 %are we disallowing symbolic links? 12 12 if nargin==6, 13 13 no_symlinks=1; … … 24 24 system(['rm -rf ' packages{i} ]); 25 25 if no_symlinks, 26 system(['cp 26 system(['cp ' here '/' packages{i} ' .']); 27 27 else 28 28 system(['ln -s ' here '/' packages{i} ' .']); … … 31 31 end 32 32 else 33 if ispc (),33 if ispc & ~ismingw, 34 34 %use the putty project pscp.exe: it should be in the path. 35 35 -
issm/trunk/src/m/os/issmscpout.py
r25836 r26744 1 import os 1 2 from socket import gethostname 2 3 import subprocess 3 import os 4 import MatlabFuncs as m 4 from MatlabFuncs import * 5 5 6 6 7 7 def issmscpout(host, path, login, port, packages): 8 """ 9 ISSMSCPOUT send packages to a host, using scp on unix, and pscp on windows 8 """ISSMSCPOUT send packages to a host, using scp on unix, and pscp on windows 10 9 11 usage: issmscpout(host, path, packages) 10 Usage: 11 issmscpout(host, path, packages) 12 12 """ 13 13 14 14 #get hostname 15 hostname = gethostname()15 hostname = oshostname() 16 16 17 17 #if hostname and host are the same, do a simple copy … … 28 28 os.chdir(here) 29 29 else: 30 if m.ispc():30 if ispc(): 31 31 #use the putty project pscp.exe: it should be in the path. 32 32 #get ISSM_DIR variable -
issm/trunk/src/m/os/issmssh.m
r13975 r26744 12 12 system(command); 13 13 else 14 if ispc (),14 if ispc & ~ismingw, 15 15 %use the putty project plink.exe: it should be in the path. 16 16 -
issm/trunk/src/m/os/issmssh.py
r24313 r26744 1 from socket import gethostname 1 import os 2 import subprocess 2 3 from sys import platform as _platform 3 import subprocess 4 import os 5 import MatlabFuncs as m 4 from MatlabFuncs import * 6 5 7 6 8 7 def issmssh(host, login, port, command): 9 """ 10 ISSMSSH - wrapper for OS independent ssh command. 8 """ISSMSSH - wrapper for OS independent ssh command. 11 9 12 usage:13 10 Usage: 11 issmssh(host, command) 14 12 """ 15 13 16 14 #first get hostname 17 hostname = gethostname()15 hostname = oshostname() 18 16 19 17 #if same as host, just run the command. 20 if m.strcmpi(host, hostname):18 if strcmpi(host, hostname): 21 19 subprocess.call(command, shell=True) 22 20 else: 23 if m.ispc():21 if ispc(): 24 22 #use the putty project plink.exe: it should be in the path. 25 23 #get ISSM_DIR variable -
issm/trunk/src/m/os/oshostname.m
r22758 r26744 22 22 %Method 3, last chance 23 23 if isempty(hostname), 24 if ispc 24 if ispc % If OS is MinGW, $COMPUTERNAME and $HOSTNAME are identical 25 25 hostname = getenv('COMPUTERNAME'); 26 26 else
Note:
See TracChangeset
for help on using the changeset viewer.