src/Pure/Admin/components.scala
changeset 73636 6945ac084763
parent 73566 4e6b31ed7197
child 73637 f3a356c64193
equal deleted inserted replaced
73635:3531d20cf2fd 73636:6945ac084763
    77     }
    77     }
    78   }
    78   }
    79 
    79 
    80   def purge(dir: Path, platform: Platform.Family.Value): Unit =
    80   def purge(dir: Path, platform: Platform.Family.Value): Unit =
    81   {
    81   {
    82     def purge_platforms(platforms: String*): Set[String] =
    82     val purge_default = Set("x86-linux", "x86-cygwin", "arm64-linux")
    83       platforms.flatMap(name =>
    83     val purge_linux = Set("x86_64-linux", "x86_64_32-linux")
    84         List("arm64-" + name, "x86-" + name, "x86_64_32-" + name, "x86_64-" + name)).toSet +
    84     val purge_macos = Set("arm64-darwin", "x86_64-darwin", "x86_64_32-darwin")
    85       "ppc-darwin" + "arm64-linux"
    85     val purge_windows = Set("x86_64-cygwin", "x86_64-windows", "x86_64_32-windows", "x86-windows")
       
    86 
    86     val purge_set =
    87     val purge_set =
    87       platform match {
    88       platform match {
    88         case Platform.Family.linux => purge_platforms("darwin", "cygwin", "windows")
    89         case Platform.Family.linux => purge_default ++ purge_macos ++ purge_windows
    89         case Platform.Family.macos => purge_platforms("linux", "cygwin", "windows")
    90         case Platform.Family.macos => purge_default ++ purge_linux ++ purge_windows
    90         case Platform.Family.windows => purge_platforms("linux", "darwin")
    91         case Platform.Family.windows => purge_default ++ purge_linux ++ purge_macos
    91       }
    92       }
    92 
    93 
    93     File.find_files(dir.file,
    94     File.find_files(dir.file,
    94       (file: JFile) => file.isDirectory && purge_set(file.getName),
    95       (file: JFile) => file.isDirectory && purge_set(file.getName),
    95       include_dirs = true).foreach(Isabelle_System.rm_tree)
    96       include_dirs = true).foreach(Isabelle_System.rm_tree)