Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gary Ruben
remote_tree_to_local_tars
Commits
a8dd57e3
Commit
a8dd57e3
authored
Aug 06, 2020
by
Gary Ruben (Monash University)
Browse files
reformed tar line to avoid leading period slash in filenames and match cpio behaviour
parent
40b1f560
Changes
1
Hide whitespace changes
Inline
Side-by-side
asci_to_vault.py
View file @
a8dd57e3
...
...
@@ -151,9 +151,9 @@ def send_directory(node, remote_login, src_path):
cmd_dest
=
escape_path
(
node
.
dest
)
cmd_filename
=
escape_path
(
filename
)
output
=
subprocess
.
run
(
f
"
ssh
{
remote_login
}
'
cd
{
cmd_src
}
;
"
f
"
nice find -maxdepth 1 -type f -print
0
|
"
f
"
xargs -0 tar -cf -
'
| cat >
{
cmd_dest
}
/
{
cmd_filename
}
.tar
"
,
f
'
ssh
{
remote_login
}
"
cd
{
cmd_src
}
;
'
f
'
nice find -maxdepth 1 -type f -print
f
\'
%f
\\
0
\'
|
'
f
'
xargs -0 tar -cf -
"
| cat >
{
cmd_dest
}
/
{
cmd_filename
}
.tar
'
,
shell
=
True
,
check
=
True
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment