Fix regular expression when replacing headers

Use non-greedy capturing where it makes sense, also
keep the user's whitespace indentation in his include statements

Change-Id: Iff2b5dabf443529292e943ae69427bd15e702bf9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Harald Fernengel 2011-11-03 00:42:32 +01:00 committed by Qt by Nokia
parent f79dc01304
commit d524bf0ee6

View File

@ -13,7 +13,7 @@ for module in $modules; do
includes=`ls $QTDIR/include/$module`
for i in $includes; do
# echo " fixing " $i
perl -pi -e "s,^#include +<.+/$i>,#include <$module/$i>," $files;
perl -pi -e "s,^#(\\s*)include(\\s+)<.+?/$i>,#\\1include\\2<$module/$i>," $files;
# perl -pi -e 's,^#include +".+/$i",#include "$module/$i",' $files;
done;
fi;