From f6562195d5312bbbf0fa32369dbdcb5e28a47df0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 26 Oct 2021 15:16:43 +0200 Subject: [PATCH] litex_setup: Make compat_args optional, fix dev mode. --- litex_setup.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/litex_setup.py b/litex_setup.py index 3fdb9e0d7..d0b27b388 100755 --- a/litex_setup.py +++ b/litex_setup.py @@ -224,22 +224,23 @@ def main(): parser.add_argument("--gcc", default=None, help="Download/Extract GCC Toolchain (riscv, powerpc, openrisc or lm32).") # Development mode. - parser.add_argument("--dev", action="store_true", help="Development-Mode (no Auto-Update).") + parser.add_argument("--dev", action="store_true", help="Development-Mode (no Auto-Update of litex_setup.py).") # Retro-compatibility. - parser.add_argument("compat_args", nargs="+", help="Retro-Compatibility arguments (init, update, install or gcc).") + parser.add_argument("compat_args", nargs="*", help="Retro-Compatibility arguments (init, update, install or gcc).") args = parser.parse_args() # Handle compat_args. - for arg in args.compat_args: - if arg in ["init", "update", "install"]: - setattr(args, arg, True) - if arg in ["gcc"]: - args.gcc = "riscv" + if args.compat_args is not None: + for arg in args.compat_args: + if arg in ["init", "update", "install"]: + setattr(args, arg, True) + if arg in ["gcc"]: + args.gcc = "riscv" # Location/Auto-Update. litex_setup_location_check() - if args.dev: + if not args.dev: litex_setup_auto_update() # Init.