summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-10-08 15:24:53 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-10-12 09:57:28 +0200
commita90899df4330afccd8299fa81754f369e6d12344 (patch)
treeb7be39b401ecf9808bbb1372ede9e1239c7540fd
parent6abbecf9422af043d51cbb8b3d8c2c188ee40fd3 (diff)
Default to #!/bin/bash in wrapper scripts on macOS
This gives the user the opportunity to employ BASH_ENV to circumvent macOS System Integrity Protection and set variables like DYLD_FRAMEWORK_PATH. Fixes: QTBUG-57204 Change-Id: Icd99d903a3be76fabd509e204ea61a254a96609c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--mkspecs/features/qt_functions.prf6
1 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index ee6a4b352a..661b7dd961 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -159,8 +159,12 @@ defineTest(qtAddToolEnv) {
!isEmpty(cmd): cmd = "$$cmd "
equals(ds, /) {
batch_name = $${batch_name}.sh
+ equals(QMAKE_HOST.os, Darwin):exists(/bin/bash): \
+ shell = /bin/bash
+ else: \
+ shell = /bin/sh
batch_cont = \
- "$$LITERAL_HASH!/bin/sh" \
+ "$$LITERAL_HASH!$$shell" \
$$batch_sets \
"exec $$cmd\"$@\""
# It would be nicer to use the '.' command (without 'exec' above),