Skip to content

Commit

Permalink
ssh: archieve files the symlink points to instead of symlink iteself
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed Sep 23, 2021
1 parent 6d3f187 commit 2f89efa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dpgen/dispatcher/SSHContext.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,18 @@ def _get_files(self,
per_nfile = 100
ntar = len(files) // per_nfile + 1
if ntar <= 1:
self.block_checkcall('tar czf %s %s' % (of, " ".join(files)))
self.block_checkcall('tar czfh %s %s' % (of, " ".join(files)))
else:
of_tar = self.job_uuid + '.tar'
for ii in range(ntar):
ff = files[per_nfile * ii : per_nfile * (ii+1)]
if ii == 0:
# tar cf for the first time
self.block_checkcall('tar cf %s %s' % (of_tar, " ".join(ff)))
self.block_checkcall('tar cfh %s %s' % (of_tar, " ".join(ff)))
else:
# append using tar rf
# -r, --append append files to the end of an archive
self.block_checkcall('tar rf %s %s' % (of_tar, " ".join(ff)))
self.block_checkcall('tar rfh %s %s' % (of_tar, " ".join(ff)))
# compress the tar file using gzip, and will get a tar.gz file
# overwrite considering dpgen may stop and restart
# -f, --force force overwrite of output file and compress links
Expand Down

0 comments on commit 2f89efa

Please sign in to comment.