aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthew Vogt <matthew.vogt@nokia.com>2012-05-28 15:51:42 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-30 00:46:14 +0200
commit76e3e438b3bf02601869f652da6c325aad1647f3 (patch)
tree120e7de92aadbebb51e85afb8b70e3c1f1349fe0 /bin
parent19b1b43f708504fe28552a4670c1137049e016ee (diff)
Do not modify 'declarative' in file paths
Change-Id: I527a115f02671577c754a36f3ab0b7086c5c7918 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rename-qtdeclarative-symbols.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/rename-qtdeclarative-symbols.sh b/bin/rename-qtdeclarative-symbols.sh
index 78df8554cc..efd3303164 100755
--- a/bin/rename-qtdeclarative-symbols.sh
+++ b/bin/rename-qtdeclarative-symbols.sh
@@ -583,7 +583,7 @@ replaceMatch()
REPLACEMENT="$2"
echo "Replacing $SYMBOL with $REPLACEMENT:"
- CONTAINERS=$(find "$MODIFY_DIR" ! -path ".git" -type f | xargs grep -l -I "$SYMBOL")
+ CONTAINERS=$(find "$MODIFY_DIR" ! -path ".git" -type f -print0 | xargs -0 grep -l -I "$SYMBOL")
for CONTAINER in $CONTAINERS
do
echo " $CONTAINER"
@@ -628,13 +628,14 @@ replaceMatch "\basQDeclarativeContextPrivate\b" "asQQmlContextPrivate"
# Replace any references to the 'declarative' module with 'qml'
echo "Replacing module declarative with qml:"
-CONTAINERS=$(find "$MODIFY_DIR" \( -name \*\.pro -o -name \*\.pri \) | xargs grep -l -I "\bdeclarative\b")
+CONTAINERS=$(find "$MODIFY_DIR" \( -name \*\.pro -o -name \*\.pri \) -print0 | xargs -0 grep -l -I "\bdeclarative\b")
for CONTAINER in $CONTAINERS
do
echo " $CONTAINER"
TMP_FILE="$CONTAINER.tmp"
- sed 's|\bdeclarative\b|qml|g' <"$CONTAINER" >"$TMP_FILE"
+ # We only want to replace standalone 'declarative' and 'declarative-private' tokens
+ sed 's|\([[:space:]]\+\)declarative\([[:space:]]\+\)|\1qml\2|g' <"$CONTAINER" | sed 's|\([[:space:]]\+\)declarative$|\1qml|g' | sed 's|\([[:space:]]\+\)declarative-private\([[:space:]]\+\)|\1qml-private\2|g' | sed 's|\([[:space:]]\+\)declarative-private$|\1qml-private|g' >"$TMP_FILE"
mv "$TMP_FILE" "$CONTAINER"
done
echo