forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently it always opens two terminals for me. This will always reliably open only one new terminal for Julia in all the different cases.
- Loading branch information
1 parent
7d885e7
commit 8656840
Showing
1 changed file
with
1 addition
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,9 @@ | ||
#!/bin/sh | ||
# Copyright (C) 2007, Thomas Treichl and Paul Kienzle | ||
# Copyright (C) 2008-2009, Thomas Treichl | ||
# Copyright (C) 2013, Viral B. Shah (Adapted for Julia from Octave) | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, but | ||
# WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program; If not, see <http://www.gnu.org/licenses/>. | ||
|
||
ROOT="${0%/script}" | ||
|
||
# This is the startup procedure written as AppleScript to open a | ||
# Terminal.app (if the Terminal.app is not already running) and start | ||
# the Julia program. | ||
# 20071007 removed: open -a /Applications/Utilities/Terminal.app | ||
osascript 2>&1>/dev/null <<EOF | ||
tell application "System Events" to set ProcessList to get name of every process | ||
tell application "Terminal" | ||
activate | ||
if (ProcessList contains "Terminal") or ((count of every window) is less than 1) then | ||
tell application "System Events" to tell process "Terminal" to keystroke "n" using command down | ||
end if | ||
do script ("exec '${ROOT}/julia/bin/julia'") | ||
activate | ||
end tell | ||
EOF | ||
|
||
# The app quits immediately after startup, as the app is completely | ||
# separate from the actual Julia process. Something it would be neat to | ||
# change, once we're not just using the .app to tell Terminal what to do |