Skip to content

Commit 282aaf2

Browse files
Improve macOS app launcher
1 parent a032cb3 commit 282aaf2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/build-mac-app.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
9090
osascript <<EOF
9191
tell application "Terminal"
9292
activate
93-
do script "cd ~ && \"$SCRIPT_DIR/diskdive\""
93+
set newTab to do script ""
94+
set winID to id of front window
95+
do script "cd ~ && \"$SCRIPT_DIR/diskdive\" && (osascript -e 'tell application \"Terminal\" to close (first window whose id is " & winID & ")' &) && exit" in newTab
9496
end tell
9597
EOF
9698
LAUNCHER

0 commit comments

Comments
 (0)