From 6d9b52b12e83cbb52683bea89fe160c1bd8e9541 Mon Sep 17 00:00:00 2001 From: Matthew Vogt Date: Mon, 12 Mar 2012 16:53:24 +1000 Subject: Prefer \b word boundary markers /usr/bin/sed on mac does not process '\<' and '\>' boundary markers correctly. Change-Id: I750f7c69579ddcbe39a6246a3d3321cab714fc27 Reviewed-by: Rohan McGovern --- bin/rename-qtdeclarative-symbols.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'bin') diff --git a/bin/rename-qtdeclarative-symbols.sh b/bin/rename-qtdeclarative-symbols.sh index 0d521dd5a..96633af2d 100755 --- a/bin/rename-qtdeclarative-symbols.sh +++ b/bin/rename-qtdeclarative-symbols.sh @@ -598,42 +598,43 @@ replaceMatch() for QML_SYMBOL in $QML_SYMBOLS do QML_REPLACEMENT="QQml${QML_SYMBOL#QDeclarative}" - replaceMatch "\" "QtQml/$QML_REPLACEMENT" - replaceMatch "\<$QML_SYMBOL\>" "$QML_REPLACEMENT" + replaceMatch "\bQtDeclarative/$QML_SYMBOL\b" "QtQml/$QML_REPLACEMENT" + replaceMatch "\b$QML_SYMBOL\b" "$QML_REPLACEMENT" done for QUICK_SYMBOL in $QUICK_SYMBOLS do QUICK_REPLACEMENT="QQuick${QUICK_SYMBOL#QDeclarative}" - replaceMatch "\" "QtQuick/$QUICK_REPLACEMENT" - replaceMatch "\<$QUICK_SYMBOL\>" "$QUICK_REPLACEMENT" + replaceMatch "\bQtDeclarative/$QUICK_SYMBOL\b" "QtQuick/$QUICK_REPLACEMENT" + replaceMatch "\b$QUICK_SYMBOL\b" "$QUICK_REPLACEMENT" done for QML_INCLUDE_FILE in $QML_INCLUDE_FILES do QML_INCLUDE_REPLACEMENT="qqml${QML_INCLUDE_FILE#qdeclarative}" - replaceMatch "\<$QML_INCLUDE_FILE\>" "$QML_INCLUDE_REPLACEMENT" + replaceMatch "\b$QML_INCLUDE_FILE\b" "$QML_INCLUDE_REPLACEMENT" done for QUICK_INCLUDE_FILE in $QUICK_INCLUDE_FILES do QUICK_INCLUDE_REPLACEMENT="qquick${QUICK_INCLUDE_FILE#qdeclarative}" - replaceMatch "\<$QUICK_INCLUDE_FILE\>" "$QUICK_INCLUDE_REPLACEMENT" + replaceMatch "\b$QUICK_INCLUDE_FILE\b" "$QUICK_INCLUDE_REPLACEMENT" done # Various one-off replacements -replaceMatch "\" "QtQml" -replaceMatch "\") +CONTAINERS=$(find "$MODIFY_DIR" \( -name \*\.pro -o -name \*\.pri \) | xargs grep -l -I "\bdeclarative\b") for CONTAINER in $CONTAINERS do echo " $CONTAINER" TMP_FILE="$CONTAINER.tmp" - sed 's|\|qml|g' <"$CONTAINER" >"$TMP_FILE" + sed 's|\bdeclarative\b|qml|g' <"$CONTAINER" >"$TMP_FILE" mv "$TMP_FILE" "$CONTAINER" done echo -- cgit v1.2.3