Tools: change terminal to current dir if using osascript in run_in_terminal_window.sh
- Ensure the spawned terminal has the same pwd as the calling script to allow SITL to resolve relative paths Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
parent
51eb398277
commit
6d7086a8ad
@ -31,7 +31,7 @@ if [ -n "$SITL_RITW_TERMINAL" ]; then
|
|||||||
elif [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; then
|
elif [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; then
|
||||||
tmux new-window -dn "$name" "$*"
|
tmux new-window -dn "$name" "$*"
|
||||||
elif [ -n "$DISPLAY" -a -n "$(which osascript)" ]; then
|
elif [ -n "$DISPLAY" -a -n "$(which osascript)" ]; then
|
||||||
osascript -e 'tell application "Terminal" to do script "'"$* "'"'
|
osascript -e 'tell application "Terminal" to do script "'"cd $(pwd) && clear && $* "'"'
|
||||||
elif [ -n "$DISPLAY" -a -n "$(which xterm)" ]; then
|
elif [ -n "$DISPLAY" -a -n "$(which xterm)" ]; then
|
||||||
if [ $SITL_RITW_MINIMIZE -eq 1 ]; then
|
if [ $SITL_RITW_MINIMIZE -eq 1 ]; then
|
||||||
ICONIC=-iconic
|
ICONIC=-iconic
|
||||||
|
Loading…
Reference in New Issue
Block a user