X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4df5122b9e0586dfe7e7625d6a78966c47da509c..49e85177c669d793e84242983a1b1f430e47184e:/src/smpi/patch_source.sh diff --git a/src/smpi/patch_source.sh b/src/smpi/patch_source.sh index 6587641044..38fd74593f 100755 --- a/src/smpi/patch_source.sh +++ b/src/smpi/patch_source.sh @@ -1,5 +1,16 @@ #!/bin/bash + +# Copyright (c) 2011, 2014. The SimGrid Team. +# All rights reserved. + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the license (GNU LGPL) which comes with this package. + INFILE="$1" OUTFILE="$2" SPFILE="replace_globals.cocci" -spatch -sp_file ${SPFILE} ${INFILE} 2>/dev/null | patch -o - | ./fixsrc.pl > ${OUTFILE} +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}