Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge 'master' into mc
[simgrid.git] / src / smpi / patch_source.sh
1 #!/bin/bash
2
3 # Copyright (c) 2011, 2014. The SimGrid Team.
4 # All rights reserved.
5
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the license (GNU LGPL) which comes with this package.
8
9 INFILE="$1"
10 OUTFILE="$2"
11 SPFILE="replace_globals.cocci"
12 TMPFILE=`mktemp ${OUTFILE}.XXXX`
13
14 trap "rm -f ${TMPFILE}" EXIT
15 spatch -sp_file ${SPFILE} ${INFILE} -o ${TMPFILE} >/dev/null 2>/dev/null
16 ./fixsrc.pl < ${TMPFILE} > ${OUTFILE}