Skip to content
Snippets Groups Projects
Commit b75a7587 authored by Pawel Szostek's avatar Pawel Szostek
Browse files

minor changes

parent 732822f2
No related merge requests found
...@@ -187,10 +187,7 @@ def transfer_files_forth(files): ...@@ -187,10 +187,7 @@ def transfer_files_forth(files):
if not isinstance(files, list): if not isinstance(files, list):
return None; return None;
global synth_server ssh_cmd = "ssh " + global_mod.synth_user + "@" + global_mod.synth_server
global synth_user
global ssh
ssh_cmd = "ssh " + synth_user + "@" + synth_server
randstring = ''.join(random.choice(string.ascii_letters + string.digits) for x in range(8)) randstring = ''.join(random.choice(string.ascii_letters + string.digits) for x in range(8))
#create a randstring for a new catalogue on remote machine #create a randstring for a new catalogue on remote machine
...@@ -202,9 +199,9 @@ def transfer_files_forth(files): ...@@ -202,9 +199,9 @@ def transfer_files_forth(files):
ssh.system(mkdir_cmd) ssh.system(mkdir_cmd)
#create a string with filenames #create a string with filenames
lcl_files_str = ''.join(os.path.abspath(x) + ' ' for x in files) local_files_str = ''.join(os.path.abspath(x) + ' ' for x in files)
cp_cmd = "tar -cvjf - " + lcl_files_str + "|" + ssh_cmd + ' "(cd ' + randstring + '; tar xjf -)"' cp_cmd = "tar -cvjf - " + local_files_str + "|" + ssh_cmd + ' "(cd ' + randstring + '; tar xjf -)"'
v_msg("Coping files to remote server: " + cp_cmd) v_msg("Coping files to remote server: " + cp_cmd)
os.system(cp_cmd) os.system(cp_cmd)
return randstring return randstring
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment