Framework for looking up contacts directly in nepomuk in addition to going through...
[kdepim.git] / messageviewer / ensure_config_h-included.sh
blobc25c8b41b4bd9621542348af63020569d87e6a13
1 #!/bin/bash
3 CONFIG_H=config-messageviewer.h
6 # Adds #include <$CONFIG_H> to all implementation files,
7 # right before the first existing preprocessor directive (^#)
10 my_REPLACEMENT_TEXT="#include <$CONFIG_H>
14 find "$@" -name '*.cpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.c' | \
15 xargs grep -LE '# *include *[<"]'"$CONFIG_H"'[>"]' | \
16 xargs perl -0777 -pi\~ -e "s/^#/${my_REPLACEMENT_TEXT}#/m;"