This commit is contained in:
eric
2026-04-04 15:33:17 -05:00
parent f0bfb952e8
commit 898238b3e0
5 changed files with 94 additions and 63 deletions

View File

@@ -26,6 +26,12 @@ def get_image_dir():
return ensure_dir(IMAGE_ROOT)
def is_offline_only():
"""If true, redroid build must not use the network (env REDROID_OFFLINE or CLI --offline)."""
v = os.environ.get("REDROID_OFFLINE", "").strip().lower()
return v in ("1", "true", "yes", "on")
def file_md5(path, block_size=1024 * 1024):
hasher = hashlib.md5()
with open(path, "rb") as handle: