From 34c6f88691163639adb9bc48b2f59d50be168ce2 Mon Sep 17 00:00:00 2001 From: Daniele Debernardi Date: Sun, 12 Apr 2020 21:40:20 +0200 Subject: [PATCH] pmb.install._install: add option to not generate the image (MR 1914) --- pmb/install/_install.py | 9 +++++++-- pmb/parse/arguments.py | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pmb/install/_install.py b/pmb/install/_install.py index 36003e33..cab29230 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -489,7 +489,12 @@ def install(args): sanity_check_sdcard(args.sdcard) # Number of steps for the different installation methods. - steps = 4 if args.android_recovery_zip else 5 + if args.no_image: + steps = 2 + elif args.android_recovery_zip: + steps = 4 + else: + steps = 5 # Install required programs in native chroot logging.info("*** (1/{}) PREPARE NATIVE CHROOT ***".format(steps)) @@ -547,5 +552,5 @@ def install(args): if args.android_recovery_zip: install_recovery_zip(args) - else: + elif not args.no_image: install_system_image(args) diff --git a/pmb/parse/arguments.py b/pmb/parse/arguments.py index c7b300a0..c95e1d7c 100644 --- a/pmb/parse/arguments.py +++ b/pmb/parse/arguments.py @@ -512,6 +512,8 @@ def arguments(): group.add_argument("--android-recovery-zip", help="generate TWRP flashable zip", action="store_true", dest="android_recovery_zip") + group.add_argument("--no-image", help="do not generate the image", + action="store_true", dest="no_image") install.add_argument("--rsync", help="update the sdcard using rsync," " does not work with --fde", action="store_true") install.add_argument("--cipher", help="cryptsetup cipher used to"