From 43abba7f8f9b0505b8d06507d363e080a001c1eb Mon Sep 17 00:00:00 2001 From: Richard L King Date: Wed, 14 Nov 2018 17:18:54 +0000 Subject: [PATCH] Update macOS scripts to enable running in new terminal session --- resources/gatewaystartmacos.sh | 6 +++++- resources/twsstartmacos.sh | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/resources/gatewaystartmacos.sh b/resources/gatewaystartmacos.sh index 5bbe9ff..686530a 100644 --- a/resources/gatewaystartmacos.sh +++ b/resources/gatewaystartmacos.sh @@ -158,7 +158,11 @@ export APP if [[ "$1" == "-inline" ]]; then exec "${IBC_PATH}/scripts/displaybannerandlaunch.sh" else + # run in a new terminal session. + # NB: "tell app Terminal" doesn't pass the current + # environment, so we just run this script again + # inside a new terminal session with the -inline argument osascript -e 'tell app "Terminal" - do script "${IBC_PATH}/scripts/displaybannerandlaunch.sh" + do script "/opt/ibc/gatewaystartmacos.sh -inline" end tell' fi diff --git a/resources/twsstartmacos.sh b/resources/twsstartmacos.sh index 25a4a30..9d7350c 100644 --- a/resources/twsstartmacos.sh +++ b/resources/twsstartmacos.sh @@ -144,7 +144,11 @@ export APP if [[ "$1" == "-inline" ]]; then exec "${IBC_PATH}/scripts/displaybannerandlaunch.sh" else - osascript -e 'tell app "Terminal" - do script "${IBC_PATH}/scripts/displaybannerandlaunch.sh" + # run in a new terminal session. + # NB: "tell app Terminal" doesn't pass the current + # environment, so we just run this script again + # inside a new terminal session with the -inline argument + osascript -e 'tell app "Terminal" + do script "/opt/ibc/twsstartmacos.sh -inline" end tell' fi