summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Skoland <david.skoland@qt.io>2022-06-02 16:08:16 +0200
committerDavid Skoland <david.skoland@qt.io>2022-06-27 17:55:19 +0200
commita0ecc14f30d54a1908636886b040bcdd7b69f911 (patch)
tree2689f87ff81b486d300ce7f1e159edf1253c6bc9
parent4a14a9c0141eba78d10628a92fc08a8765c5798d (diff)
Minor fixes for qt-configure-module
Put quotes around args var and add e and u flags, which do the following: e - terminates the script if an error occurs. This is certainly desirable behavior. We don't want the script to chug along with unpredictable behavior if an error occurred. u - terminates the script if an undefined variable is encountered. It is also desirable to terminate here because it might lead to unexpected behavior. Change-Id: Ia02196ef3eab64521e36771530d033a15bb40ecc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
-rwxr-xr-xbin/qt-configure-module.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/qt-configure-module.in b/bin/qt-configure-module.in
index cdd350ea22..d0a2f3bdf4 100755
--- a/bin/qt-configure-module.in
+++ b/bin/qt-configure-module.in
@@ -1,4 +1,6 @@
#!/bin/sh
+set -eu
+
script_dir_path=`dirname $0`
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
@@ -28,7 +30,7 @@ fi
optfile=config.opt
echo > "$optfile"
for arg in "$@"; do
-echo $arg >> "$optfile"
+echo "$arg" >> "$optfile"
done
cmake_script_path="$script_dir_path/@__relative_path_to_cmake_scripts_dir@/QtProcessConfigureArgs.cmake"