40 cmd =
"find . -type f ! -name '*.svn-base' -a ! -name '*.hg' -a ! -name '*.git' -a " \
41 "\( -name '*.c*' -o -name '*.h*' \)"
44 'class_loader/class_loader.h':
'class_loader/class_loader.hpp',
45 'class_loader/class_loader_core.h':
'class_loader/class_loader_core.hpp',
46 'class_loader/class_loader_exceptions.h':
'class_loader/exceptions.hpp',
47 'class_loader/class_loader_register_macro.h':
'class_loader/register_macro.hpp',
48 'class_loader/meta_object.h':
'class_loader/meta_object.hpp',
49 'class_loader/multi_library_class_loader.h':
'class_loader/multi_library_class_loader.hpp',
50 'class_loader/console_bridge_compatibility.h':
'class_loader/console_bridge_compatibility.hpp',
56 include_prefix =
'#include '
57 sed_cmd_prefix =
' -exec sed -i \' s'
58 sed_cmd_suffix =
' {} \; '
61 for old_header, new_header
in header_mappings.items():
62 for leading_token, ending_token
in include_tokens.items():
64 sed_cmd_prefix + sed_separator + \
65 include_prefix + leading_token + old_header + ending_token + sed_separator + \
66 include_prefix + leading_token + new_header + ending_token + sed_separator + \
68 print(
"Looking for '%s' to replace with '%s'" % (old_header, new_header))
70 print(
'Running %s' % full_cmd)
71 ret_code = subprocess.call(full_cmd, shell=
True)