equal
deleted
inserted
replaced
14 def admin(dir: Path): Path = dir + Path.explode("Admin/components") |
14 def admin(dir: Path): Path = dir + Path.explode("Admin/components") |
15 |
15 |
16 def contrib(dir: Path = Path.current, name: String = ""): Path = |
16 def contrib(dir: Path = Path.current, name: String = ""): Path = |
17 dir + Path.explode("contrib") + Path.explode(name) |
17 dir + Path.explode("contrib") + Path.explode(name) |
18 |
18 |
|
19 def download(dir: Path, names: List[String], progress: Progress = No_Progress) |
|
20 { |
|
21 Isabelle_System.mkdirs(dir) |
|
22 for (name <- names) { |
|
23 val archive = name + ".tar.gz" |
|
24 val target = dir + Path.explode(archive) |
|
25 if (!target.is_file) { |
|
26 val remote = Isabelle_System.getenv("ISABELLE_COMPONENT_REPOSITORY") + "/" + archive |
|
27 progress.echo("Getting " + quote(remote)) |
|
28 Bytes.write(target, Url.read_bytes(Url(remote))) |
|
29 } |
|
30 } |
|
31 } |
|
32 |
19 |
33 |
20 /* component directory content */ |
34 /* component directory content */ |
21 |
35 |
22 def settings(dir: Path): Path = dir + Path.explode("etc/settings") |
36 def settings(dir: Path): Path = dir + Path.explode("etc/settings") |
23 def components(dir: Path): Path = dir + Path.explode("etc/components") |
37 def components(dir: Path): Path = dir + Path.explode("etc/components") |