source: XMLIO_V2/dev/common/src/xmlio/iface/preprocess_cpp.sh @ 219

Last change on this file since 219 was 219, checked in by hozdoba, 13 years ago

Préparation nouvelle arborescence

  • Property svn:executable set to *
File size: 380 bytes
Line 
1#!/bin/bash
2if [[ $# != 2 ]] ; then
3   echo "Usage : ./prepocess_cpp.sh <output> <input>"
4   exit
5fi
6
7if test -f $2; then
8   cpp -x c++ -P -o $1.0.temp  $2;
9   sed 's/;;/\r\n/g' <$1.0.temp >$1.1.temp
10   sed 's/INCLUDE/#include/g' <$1.1.temp >$1.0.temp
11   sed 's/\r\n \r\n/\r\n/g' <$1.0.temp >$1
12   rm -f $1.0.temp $1.1.temp
13else
14   echo "le fichier d'entrée n'existe pas !"
15fi
16
17
Note: See TracBrowser for help on using the repository browser.