mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Fix for nested directories in tar archive (#2062)
* Fix for nested directories in tar archive * fix untar for tar with a single directory * prettier
This commit is contained in:
parent
978087354e
commit
b63b9f752d
2 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ process UNTAR {
|
|||
|
||||
## Ensures --strip-components only applied when top level of tar contents is a directory
|
||||
## If just files or multiple directories, place all in output
|
||||
if [[ \$(tar -tzf ${archive} | grep "/\$" | wc -l) -eq 1 ]]; then
|
||||
if [[ \$(tar -tzf ${archive} | grep -o -P "^.*?\\/" | uniq | wc -l) -eq 1 ]]; then
|
||||
tar \\
|
||||
-C output --strip-components 1 \\
|
||||
-xzvf \\
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
tags:
|
||||
- untar
|
||||
files:
|
||||
- path: output/untar/flowcell/220422_M11111_0222_000000000-K9H97/RunInfo.xml
|
||||
- path: output/untar/flowcell/RunInfo.xml
|
||||
md5sum: 03038959f4dd181c86bc97ae71fe270a
|
||||
|
||||
- name: untar test_untar_onlyfiles
|
||||
|
|
Loading…
Reference in a new issue