From c6d3f51b5ffdc76d67f1776b241cd230beb36666 Mon Sep 17 00:00:00 2001 From: Liam Murphy Date: Tue, 9 Aug 2022 16:12:37 +1000 Subject: [PATCH] Add configure-only mode to deploy.py script (#471) * Add configure-only mode to deploy.py script * Default configure flag to true --- deploy.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/deploy.py b/deploy.py index 5759d90..76296b2 100755 --- a/deploy.py +++ b/deploy.py @@ -767,7 +767,7 @@ class OpenSKInstaller: self.update_rustc_if_needed() if not (self.args.tockos or self.args.application or - self.args.clear_storage): + self.args.clear_storage or self.args.configure): info("Nothing to do.") return 0 @@ -877,9 +877,12 @@ class OpenSKInstaller: return 0 # Perform checks if OpenSK was flashed. - if self.args.application != "ctap2": - return 0 + if self.args.application == "ctap2" or self.args.configure: + self.configure() + return 0 + def configure(self): + info("Configuring device.") # Trying to check or configure the device. Booting might take some time. for i in range(5): # Increasing wait time, total of 10 seconds. @@ -1075,6 +1078,13 @@ if __name__ == "__main__": dest="features", help=("Compiles the OpenSK application with support for nfc."), ) + main_parser.add_argument( + "--configure", + action="store_true", + default=True, + dest="configure", + help="Configure.", + ) main_parser.add_argument( "--vendor-hid", action="append_const",