X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7f28d0c88e047b142cfc7d5f73c19762cb27c0c5..7705e849132559bfd169a04c26296cc22f2d3743:/src/smpi/patch_source.sh diff --git a/src/smpi/patch_source.sh b/src/smpi/patch_source.sh index 9b4319686d..89e981b5fa 100755 --- a/src/smpi/patch_source.sh +++ b/src/smpi/patch_source.sh @@ -2,6 +2,8 @@ INFILE="$1" OUTFILE="$2" SPFILE="replace_globals.cocci" -spatch -sp_file ${SPFILE} $1 -o $2.tmp >/dev/null 2>/dev/null -./fixsrc.pl < $2.tmp > $2 -rm $2.tmp +TMPFILE=`mktemp ${OUTFILE}.XXXX` + +trap "rm -f ${TMPFILE}" EXIT +spatch -sp_file ${SPFILE} ${INFILE} -o ${TMPFILE} >/dev/null 2>/dev/null +./fixsrc.pl < ${TMPFILE} > ${OUTFILE}