Skip to content

Commit

Permalink
Resfinder download should not use tar wildcards, broken in busybox #494
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Oct 14, 2021
1 parent e85ceb9 commit 56816b3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data/workflow/databases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 56816b3

Please sign in to comment.