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:
parent
f79dc01304
commit
d524bf0ee6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user