]> Creatis software - clitk.git/commitdiff
Added trap as suggested by Fabrice
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 27 Jun 2013 14:31:05 +0000 (16:31 +0200)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 27 Jun 2013 14:31:05 +0000 (16:31 +0200)
cluster_tools/gate_job_cluster.job

index 52540b214578efae945ee5aea151ac1ea01de5e5..6b893b11395af8acad335a094e6d9f3b4557534e 100644 (file)
@@ -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