Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9389 | Boppan | 1 | import os |
2 | |||
3 | from .network import download |
||
4 | from .constants import tools_cache |
||
5 | |||
6 | def builds_get(path): |
||
7 | url = f"http://builds.kolibrios.org/{path}" |
||
8 | output_path = f"{tools_cache}/builds.kolibrios.org/{path}" |
||
9 | output_dir = os.path.dirname(output_path) |
||
10 | os.makedirs(output_dir, exist_ok = True) |
||
11 | download(url, output_path, skip_exist = True) |
||
12 | return output_path |
||
13 | |||
14 | def builds_get_contents(path): |
||
15 | output_path = builds_get(path) |
||
16 | with open(output_path, "rb") as f: |
||
17 | return f.read() |
||
18 |