# HG changeset patch # User wenzelm # Date 1219525666 -7200 # Node ID 1dfb0e260e4cb7fe02987dbb6218c5873f22f0fd # Parent 18d02c0b90b6e9b065a0b681985a551fb9048d0e added exec; private posix_prefix; diff -r 18d02c0b90b6 -r 1dfb0e260e4c src/Pure/Tools/isabelle_system.scala --- a/src/Pure/Tools/isabelle_system.scala Sat Aug 23 23:07:44 2008 +0200 +++ b/src/Pure/Tools/isabelle_system.scala Sat Aug 23 23:07:46 2008 +0200 @@ -2,7 +2,7 @@ ID: $Id$ Author: Makarius -Isabelle system support: settings and path specifications. +Isabelle system support -- basic Cygwin/Posix compatibility. */ package isabelle @@ -30,7 +30,7 @@ } - /* File path specifications */ + /* file path specifications */ private val cygdrive_pattern = Pattern.compile("/cygdrive/([a-zA-Z])($|/.*)") @@ -73,12 +73,14 @@ } - /* Cygwin shell prefix */ + /* processes */ - def shell_prefix() = { + private def posix_prefix() = { if (Pattern.matches(".*-cygwin", getenv_strict("ML_PLATFORM"))) - Some(platform_path("/bin/env")) - else None + List(platform_path("/bin/env")) + else Nil } + def exec(args: List[String]) = Runtime.getRuntime.exec((posix_prefix() ++ args).toArray) + }