From: Simon Rit Date: Thu, 27 Jun 2013 14:31:05 +0000 (+0200) Subject: Added trap as suggested by Fabrice X-Git-Tag: v1.4.0~177^2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=27e8d3fdd1dd0dee41d03e3cc31846423b994439;p=clitk.git Added trap as suggested by Fabrice --- diff --git a/cluster_tools/gate_job_cluster.job b/cluster_tools/gate_job_cluster.job index 52540b2..6b893b1 100644 --- a/cluster_tools/gate_job_cluster.job +++ b/cluster_tools/gate_job_cluster.job @@ -65,6 +65,7 @@ test -d "${MACRODIR}" && test -d "${MACRODIR}/mac" || error "invalid macro" echo "Copying inputs" LOCALMACRODIR=$(mktemp -d) +trap "rm -rf ${LOCALMACRODIR} ; exit 1" 1 2 3 15 cd ${LOCALMACRODIR} cp -r -L "${MACRODIR}"/{data,mac} . mkdir output