Fix zip creation

This commit is contained in:
Patrick Jentsch 2020-04-04 15:37:12 +02:00
parent e061a7426d
commit 30d127f3af

6
nlp
View File

@ -99,12 +99,16 @@ class NLPPipeline(WorkflowRunner):
''' '''
zip_jobs = [] zip_jobs = []
if self.zip is not None: if self.zip is not None:
# Remove .zip file extension if provided
if self.zip.endswith('.zip'):
self.zip = self.zip[:-4]
self.zip = self.zip if self.zip else 'output'
cmd = 'cd "{}"'.format(self.output_dir) cmd = 'cd "{}"'.format(self.output_dir)
cmd += ' && ' cmd += ' && '
cmd += 'zip' cmd += 'zip'
cmd += ' -m' cmd += ' -m'
cmd += ' -r' cmd += ' -r'
cmd += ' "{}_-_vrt" .'.format(self.zip) cmd += ' "{}".zip .'.format(self.zip)
cmd += ' -x "pyflow.data*"' cmd += ' -x "pyflow.data*"'
cmd += ' -i "*.vrt"' cmd += ' -i "*.vrt"'
cmd += ' && ' cmd += ' && '