From 56816b39648623b25fc37177bd787874eab7b3b1 Mon Sep 17 00:00:00 2001 From: Milot Mirdita Date: Thu, 14 Oct 2021 15:55:15 +0200 Subject: [PATCH] Resfinder download should not use tar wildcards, broken in busybox #494 --- data/workflow/databases.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/data/workflow/databases.sh b/data/workflow/databases.sh index 159a8e1f2..5e98205d5 100644 --- a/data/workflow/databases.sh +++ b/data/workflow/databases.sh @@ -223,8 +223,11 @@ case "${SELECTION}" in if notExists "${TMP_PATH}/download.done"; then downloadFile "https://api.bitbucket.org/2.0/repositories/genomicepidemiology/resfinder_db/commit/master?fields=hash,date" "${TMP_PATH}/version" downloadFile "https://bitbucket.org/genomicepidemiology/resfinder_db/get/master.tar.gz" "${TMP_PATH}/master.tar.gz" - tar -C "${TMP_PATH}" --strip-components=1 -xzvf "${TMP_PATH}/master.tar.gz" "*.fsa" - rm -f "${TMP_PATH}/master.tar.gz" + # avoid tar wildcard extraction as it's not available in busybox tar (windows, biocontainer) + mkdir -p "${TMP_PATH}/fsa" + tar -C "${TMP_PATH}/fsa" --strip-components=1 -xzvf "${TMP_PATH}/master.tar.gz" + mv -f -- "${TMP_PATH}/fsa/"*.fsa "${TMP_PATH}" + rm -rf -- "${TMP_PATH}/master.tar.gz" "${TMP_PATH}/fsa" touch "${TMP_PATH}/download.done" fi INPUT_TYPE="FSA"