Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31514e3e authored by ctso's avatar ctso
Browse files

Add --backup option to ota_from_target_files

parent 791beab5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ $(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) otatools
	   -m $(scriptmode) \
	   -p $(HOST_OUT) \
           -k $(KEY_CERT_PAIR) \
           --backup $(backuptool) \
           --backup=$(backuptool) \
           $(BUILT_TARGET_FILES_PACKAGE) $@

.PHONY: otapackage
+6 −4
Original line number Diff line number Diff line
@@ -356,6 +356,7 @@ def WriteFullOTAPackage(input_zip, output_zip):
  AppendAssertions(script, input_zip)
  device_specific.FullOTA_Assertions()

  if OPTIONS.backuptool:
    script.FormatPartition("cache")
    script.RunBackup("backup")

@@ -842,7 +843,7 @@ def main(argv):
    elif o in ("--worker_threads"):
      OPTIONS.worker_threads = int(a)
    elif o in ("--backup"):
      OPTIONS.backuptool = bool(a is 'true')
      OPTIONS.backuptool = bool(a.lower() is 'true')
    else:
      return False
    return True
@@ -856,7 +857,8 @@ def main(argv):
                                              "no_prereq",
                                              "extra_script=",
                                              "script_mode=",
                                              "worker_threads="],
                                              "worker_threads=",
                                              "backup="],
                             extra_option_handler=option_handler)

  if len(args) != 2: