src/Pure/Admin/build_cygwin.scala
changeset 68374 8740e1241555
parent 66727 56b92ce30d87
child 69277 258bef08b31e
equal deleted inserted replaced
68370:bcdc47c9d4af 68374:8740e1241555
     7 package isabelle
     7 package isabelle
     8 
     8 
     9 
     9 
    10 object Build_Cygwin
    10 object Build_Cygwin
    11 {
    11 {
    12   val default_mirror: String = "http://isabelle.in.tum.de/cygwin_2017"
    12   val default_mirror: String = "https://isabelle.sketis.net/cygwin_2018"
    13 
    13 
    14   val packages: List[String] =
    14   val packages: List[String] =
    15     List("curl", "nano", "perl", "perl-libwww-perl", "rlwrap", "unzip")
    15     List("curl", "nano", "perl", "perl-libwww-perl", "rlwrap", "unzip")
    16 
    16 
    17   def build_cygwin(progress: Progress,
    17   def build_cygwin(progress: Progress,
    30         val cygwin_exe_name = mirror + "/setup-x86_64.exe"
    30         val cygwin_exe_name = mirror + "/setup-x86_64.exe"
    31         val cygwin_exe = cygwin_isabelle + Path.explode("cygwin.exe")
    31         val cygwin_exe = cygwin_isabelle + Path.explode("cygwin.exe")
    32         Bytes.write(cygwin_exe,
    32         Bytes.write(cygwin_exe,
    33           try { Bytes.read(Url(cygwin_exe_name)) }
    33           try { Bytes.read(Url(cygwin_exe_name)) }
    34           catch { case ERROR(_) => error("Failed to download " + quote(cygwin_exe_name)) })
    34           catch { case ERROR(_) => error("Failed to download " + quote(cygwin_exe_name)) })
       
    35 
       
    36         File.write(cygwin_isabelle + Path.explode("cygwin_mirror"), mirror)
    35 
    37 
    36         Isabelle_System.bash(
    38         Isabelle_System.bash(
    37           "chmod +x " + File.bash_path(cygwin_exe) + " && " +
    39           "chmod +x " + File.bash_path(cygwin_exe) + " && " +
    38           File.bash_path(cygwin_exe) + " -h </dev/null >/dev/null").check
    40           File.bash_path(cygwin_exe) + " -h </dev/null >/dev/null").check
    39 
    41