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:10:53 +0200
commit62d71bc10685e6843c32b9b913662c1d9fe44c52 (patch)
treecbffbf09916e090ecff6b312b592f63123c5682b
parent357da29bcc213099469aaa893d6163b3983483cb (diff)
downloadtqtinterface-62d71bc10685e6843c32b9b913662c1d9fe44c52.tar.gz
tqtinterface-62d71bc10685e6843c32b9b913662c1d9fe44c52.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.cmake6
-rwxr-xr-xqtinterface/tqt-replace.cmake2
4 files changed, 8 insertions, 8 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.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.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