src/Pure/System/isabelle_platform.scala
changeset 83138 c66d77fb729e
parent 83124 921ca143fd94
child 83139 c87375585b9f
equal deleted inserted replaced
83136:b6e117b5d0f0 83138:c66d77fb729e
    66     def is_arm: Boolean = is_linux_arm || is_macos_arm
    66     def is_arm: Boolean = is_linux_arm || is_macos_arm
    67 
    67 
    68     def standard_path(path: Path): String =
    68     def standard_path(path: Path): String =
    69       mingw.standard_path(File.platform_path(path))
    69       mingw.standard_path(File.platform_path(path))
    70 
    70 
    71     def execute(cwd: Path, script_lines: String*): Process_Result = {
    71     def bash(script: String, cwd: Path = Path.current): Process_Result =
    72       val script = cat_lines("set -e" :: script_lines.toList)
    72       progress.bash(
    73       val script1 =
       
    74         if (is_macos_arm) "arch -arch arm64 bash -c " + Bash.string(script)
    73         if (is_macos_arm) "arch -arch arm64 bash -c " + Bash.string(script)
    75         else mingw.bash_script(script)
    74         else mingw.bash_script(script),
    76       progress.bash(script1, cwd = cwd, echo = progress.verbose).check
    75         cwd = cwd, echo = progress.verbose)
    77     }
       
    78   }
    76   }
    79 }
    77 }
    80 
    78 
    81 class Isabelle_Platform private(val settings: List[(String, String)]) {
    79 class Isabelle_Platform private(val settings: List[(String, String)]) {
    82   private def get(name: String): String =
    80   private def get(name: String): String =