Skip to content

Commit

Permalink
Faster NEOS download and auto removal of NEOS image after installation (
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Dec 21, 2018
1 parent 067f1bf commit 4610a6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Binary file modified installer/updater/updater
Binary file not shown.
9 changes: 6 additions & 3 deletions selfdrive/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def unblock_stdout():
os._exit(os.wait()[1])

if __name__ == "__main__":
if os.path.isfile("/init.qcom.rc") \
and (not os.path.isfile("/VERSION") or int(open("/VERSION").read()) < 8):

neos_update_required = os.path.isfile("/init.qcom.rc") \
and (not os.path.isfile("/VERSION") or int(open("/VERSION").read()) < 8)
if neos_update_required:
# update continue.sh before updating NEOS
if os.path.isfile(os.path.join(BASEDIR, "scripts", "continue.sh")):
from shutil import copyfile
Expand All @@ -54,6 +54,9 @@ def unblock_stdout():
subprocess.check_call(["git", "clean", "-xdf"], cwd=BASEDIR)
os.system(os.path.join(BASEDIR, "installer", "updater", "updater"))
raise Exception("NEOS outdated")
elif os.path.isdir("/data/neoupdate"):
from shutil import rmtree
rmtree("/data/neoupdate")

unblock_stdout()

Expand Down

0 comments on commit 4610a6e

Please sign in to comment.