src/Pure/Tools/isabelle_system.scala
changeset 27974 1dfb0e260e4c
parent 27962 28a306e675ba
child 27993 6dd90ef9f927
     1.1 --- a/src/Pure/Tools/isabelle_system.scala	Sat Aug 23 23:07:44 2008 +0200
     1.2 +++ b/src/Pure/Tools/isabelle_system.scala	Sat Aug 23 23:07:46 2008 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4      ID:         $Id$
     1.5      Author:     Makarius
     1.6  
     1.7 -Isabelle system support: settings and path specifications.
     1.8 +Isabelle system support -- basic Cygwin/Posix compatibility.
     1.9  */
    1.10  
    1.11  package isabelle
    1.12 @@ -30,7 +30,7 @@
    1.13    }
    1.14  
    1.15  
    1.16 -  /* File path specifications */
    1.17 +  /* file path specifications */
    1.18  
    1.19    private val cygdrive_pattern = Pattern.compile("/cygdrive/([a-zA-Z])($|/.*)")
    1.20  
    1.21 @@ -73,12 +73,14 @@
    1.22    }
    1.23  
    1.24  
    1.25 -  /* Cygwin shell prefix */
    1.26 +  /* processes */
    1.27  
    1.28 -  def shell_prefix() = {
    1.29 +  private def posix_prefix() = {
    1.30      if (Pattern.matches(".*-cygwin", getenv_strict("ML_PLATFORM")))
    1.31 -      Some(platform_path("/bin/env"))
    1.32 -    else None
    1.33 +      List(platform_path("/bin/env"))
    1.34 +    else Nil
    1.35    }
    1.36  
    1.37 +  def exec(args: List[String]) = Runtime.getRuntime.exec((posix_prefix() ++ args).toArray)
    1.38 +
    1.39  }