[WS] Cache kolibri.img in _tools/cache

git-svn-id: svn://kolibrios.org@9383 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2021-12-04 10:35:34 +00:00
parent 460c5f6329
commit 9b8a7d74cc
3 changed files with 16 additions and 4 deletions

View File

@@ -4,7 +4,9 @@
import os
from lib.network import download_if_not_exist
from lib.logging import log
from lib.constants import tools_cache, tools_cache_kolibri_img
def generate_script_executing_script(script_to_execute):
script_to_execute = script_to_execute.replace("\\", "\\\\")
@@ -35,3 +37,7 @@ if __name__ == "__main__":
# Initalize tup here
# TODO: Do anything if tup doesn't exist
os.system("tup init")
# Download IMG to _tools/cache
os.makedirs(tools_cache, exist_ok = True)
img_url = "http://builds.kolibrios.org/eng/data/data/kolibri.img"
download_if_not_exist(img_url, tools_cache_kolibri_img)