summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-09-14 02:49:15 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-09-14 03:00:08 +0200
commit6ce1ad64e9ed1d7a3fe0278596d9b9113a001101 (patch)
treed0e479ea8199b49b1c6796ad4ce0eae2dfb57610
parent41712dcbc31185707b6f17ac9f70b1f8bd9faa40 (diff)
downloadtqtinterface-6ce1ad64e9ed1d7a3fe0278596d9b9113a001101.tar.gz
tqtinterface-6ce1ad64e9ed1d7a3fe0278596d9b9113a001101.zip
Add quotes for the file name used as a parameter in tqt-replace scripts.
This resolves bug 3158. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit b5fb7ec59011fb1a75ae84c718ed7e7c19e33dd2)
-rwxr-xr-xqtinterface/tqt-replace2
-rwxr-xr-xqtinterface/tqt-replace-stream6
-rwxr-xr-xqtinterface/tqt-replace-stream-tqt3.cmake4
-rwxr-xr-xqtinterface/tqt-replace-stream.cmake6
-rwxr-xr-xqtinterface/tqt-replace-tqt3.cmake2
-rwxr-xr-xqtinterface/tqt-replace.cmake2
6 files changed, 11 insertions, 11 deletions
diff --git a/qtinterface/tqt-replace b/qtinterface/tqt-replace
index 5afceb4..fae2b74 100755
--- a/qtinterface/tqt-replace
+++ b/qtinterface/tqt-replace
@@ -1,7 +1,7 @@
#!/bin/bash
QT_VER=X
-if [[ $1 == "" ]]; then
+if [[ "$1" == "" ]]; then
echo "Usage: tqt-replace <input_file>"
else
if [[ $QT_VER == 3 ]]; then
diff --git a/qtinterface/tqt-replace-stream b/qtinterface/tqt-replace-stream
index 4cda1ca..fcdad0b 100755
--- a/qtinterface/tqt-replace-stream
+++ b/qtinterface/tqt-replace-stream
@@ -1,11 +1,11 @@
#!/bin/bash
QT_VER=X
-if [[ $1 == "" ]]; then
+if [[ "$1" == "" ]]; then
echo "Usage: tqt-replace-stream <filename>"
else
if [[ $QT_VER == 3 ]]; then
- cat $1 | \
+ cat "$1" | \
sed 's/^TQ\([^T_]\)/Q\1/g' | \
sed 's/\([^_]\)TQ\([^T_]\)/\1Q\2/g' | \
sed 's/TQT\([^_]\)/QT\1/g' | \
@@ -33,7 +33,7 @@ else
fi
if [[ $QT_VER == 4 ]]; then
- cat $1 | \
+ cat "$1" | \
sed 's/TQAccel/Q3Accel/g' | \
sed 's/TQAccessible/QAccessible/g' | \
sed 's/TQAccessibleObject/QAccessibleObject/g' | \
diff --git a/qtinterface/tqt-replace-stream-tqt3.cmake b/qtinterface/tqt-replace-stream-tqt3.cmake
index c30e562..14f7308 100755
--- a/qtinterface/tqt-replace-stream-tqt3.cmake
+++ b/qtinterface/tqt-replace-stream-tqt3.cmake
@@ -1,8 +1,8 @@
#!/bin/bash
QT_VERSION=@QT_VERSION@
-if [[ $1 == "" ]]; then
+if [[ "$1" == "" ]]; then
echo "Usage: tqt-replace-stream <filename>"
else
- cat $1 | sed 's/^Q_OBJECT/TQ_OBJECT/g' | sed 's/\([^T]\)Q_OBJECT/\1TQ_OBJECT/g'
+ cat "$1" | sed 's/^Q_OBJECT/TQ_OBJECT/g' | sed 's/\([^T]\)Q_OBJECT/\1TQ_OBJECT/g'
fi
diff --git a/qtinterface/tqt-replace-stream.cmake b/qtinterface/tqt-replace-stream.cmake
index 0d24627..7b0a415 100755
--- a/qtinterface/tqt-replace-stream.cmake
+++ b/qtinterface/tqt-replace-stream.cmake
@@ -1,11 +1,11 @@
#!/bin/bash
QT_VERSION=@QT_VERSION@
-if [[ $1 == "" ]]; then
+if [[ "$1" == "" ]]; then
echo "Usage: tqt-replace-stream <filename>"
else
if [[ $QT_VERSION == 3 ]]; then
- cat $1 | \
+ cat "$1" | \
sed 's/^TQ\([^T_]\)/Q\1/g' | \
sed 's/\([^_]\)TQ\([^T_]\)/\1Q\2/g' | \
sed 's/TQT\([^_]\)/QT\1/g' | \
@@ -33,7 +33,7 @@ else
fi
if [[ $QT_VERSION == 4 ]]; then
- cat $1 | \
+ cat "$1" | \
sed 's/TQAccel/Q3Accel/g' | \
sed 's/TQAccessible/QAccessible/g' | \
sed 's/TQAccessibleObject/QAccessibleObject/g' | \
diff --git a/qtinterface/tqt-replace-tqt3.cmake b/qtinterface/tqt-replace-tqt3.cmake
index cb7de9c..413dee5 100755
--- a/qtinterface/tqt-replace-tqt3.cmake
+++ b/qtinterface/tqt-replace-tqt3.cmake
@@ -1,7 +1,7 @@
#!/bin/bash
QT_VERSION=@QT_VERSION@
-if [[ $1 == "" ]]; then
+if [[ "$1" == "" ]]; then
echo "Usage: tqt-replace <input_file>"
else
sed -i 's/Q_SLOTS>/slots>/g' "$1"
diff --git a/qtinterface/tqt-replace.cmake b/qtinterface/tqt-replace.cmake
index 6123a92..2388733 100755
--- a/qtinterface/tqt-replace.cmake
+++ b/qtinterface/tqt-replace.cmake
@@ -1,7 +1,7 @@
#!/bin/bash
QT_VERSION=@QT_VERSION@
-if [[ $1 == "" ]]; then
+if [[ "$1" == "" ]]; then
echo "Usage: tqt-replace <input_file>"
else
if [[ $QT_VERSION == 3 ]]; then