Skip to content
This repository was archived by the owner on Jan 27, 2020. It is now read-only.

Commit cd552e8

Browse files
committed
add --keep option to test.sh to keep logs
1 parent 1c8c9e3 commit cd552e8

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

scripts/test.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -xeuo pipefail
33

44
BUILD=false
5+
KEEP=false
56
GENOME=smallGRCh37
67
PROFILE=singularity
78
SAMPLE=data/tsv/tiny.tsv
@@ -32,6 +33,10 @@ do
3233
shift # past argument
3334
shift # past value
3435
;;
36+
-k|--keep)
37+
KEEP=true
38+
shift # past value
39+
;;
3540
-b|--build)
3641
BUILD=true
3742
shift # past value
@@ -52,7 +57,7 @@ function run_wrapper() {
5257
}
5358

5459
function clean_repo() {
55-
if [[ $TRAVIS == false ]]
60+
if [[ $TRAVIS == false ]] && [[ $KEEP == true ]]
5661
then
5762
rm -rf work .nextflow* Preprocessing Reports Annotation VariantCalling Results
5863
fi
@@ -128,7 +133,7 @@ then
128133
fi
129134
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz --noReports
130135
run_wrapper --annotate --tools ${ANNOTATOR} --annotateVCF data/tiny/vcf/Strelka_1234N_variants.vcf.gz,data/tiny/vcf/Strelka_9876T_variants.vcf.gz
131-
# clean_repo
136+
clean_repo
132137
fi
133138

134139
if [[ ALL,BUILDCONTAINERS =~ $TEST ]] && [[ $PROFILE == docker ]]

0 commit comments

Comments
 (0)