forked from KolibriOS/kolibrios
git-svn-id: svn://kolibrios.org@9389 a494cfbc-eb01-0410-851d-a64ba20cac60
19 lines
505 B
Python
19 lines
505 B
Python
import os
|
|
|
|
from .network import download
|
|
from .constants import tools_cache
|
|
|
|
def builds_get(path):
|
|
url = f"http://builds.kolibrios.org/{path}"
|
|
output_path = f"{tools_cache}/builds.kolibrios.org/{path}"
|
|
output_dir = os.path.dirname(output_path)
|
|
os.makedirs(output_dir, exist_ok = True)
|
|
download(url, output_path, skip_exist = True)
|
|
return output_path
|
|
|
|
def builds_get_contents(path):
|
|
output_path = builds_get(path)
|
|
with open(output_path, "rb") as f:
|
|
return f.read()
|
|
|