From dac45c1f6ea72f9145305c3772ff19b86cacb8ea Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Tue, 22 Jun 2021 07:27:43 +0000 Subject: [PATCH] cp dir when it exits --- utils/tarball.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/tarball.sh b/utils/tarball.sh index a4611c75b..5f7c21a34 100755 --- a/utils/tarball.sh +++ b/utils/tarball.sh @@ -19,7 +19,9 @@ function clean() { trap clean EXIT # ckpt_prfix dir -cp -r ${ckpt_prefix} ${output} +if [ -d ${ckpt_prefix} ];then + cp -r ${ckpt_prefix} ${output} +fi # ckpt_prfix.{json,...} cp ${ckpt_prefix}.* ${output} # model config, mean std, vocab