diff --git a/src/agat/agat_sp_add_introns/test.sh b/src/agat/agat_sp_add_introns/test.sh index 68b54cf7..54ec04dc 100644 --- a/src/agat/agat_sp_add_introns/test.sh +++ b/src/agat/agat_sp_add_introns/test.sh @@ -8,9 +8,9 @@ set -e test_dir="${meta_resources_dir}/test_data" # create temporary directory and clean up on exit -TMPDIR=$(mktemp -d --tmpdir "$meta_temp_dir") +TMPDIR=$(mktemp -d "$meta_temp_dir/$meta_functionality_name-XXXXXX") function clean_up { - rm -rf "$TMPDIR" + [[ -d "$TMPDIR" ]] && rm -rf "$TMPDIR" } trap clean_up EXIT