2 // some things (e.g. SVN certificate acceptance, for Quarks) can only be achieved in an interactive prompt
3 runInTerminal { | shell="/bin/bash" |
6 // At present we only know how to do this when /usr/bin/open exists, which unfortunately means OSX-only.
7 if(File.exists("/usr/bin/open").not){
8 "String:runInTerminal - /usr/bin/open not found, unable to run. Usually this means you're not using Mac OSX, which is at present the only platform which supports String:runInTerminal (sorry).".error;
11 fpath = PathName.tmp ++ "SCStringForTerminal" ++ (this.hash.asString) ++ ".command";
12 file = File(fpath, "w");
14 if(file.isOpen.not) {"String:runInTerminal was unable to create the script file".error} {
15 file.write("#!"++shell++"\n"
17 ++"rm"+fpath.quote+"\n");
19 ("/bin/chmod +x" + fpath).systemCmd;
20 ("/usr/bin/open -a Terminal" + fpath).systemCmd;
25 ("open " ++ this.escapeChar($ )).systemCmd