litex_setup: Make compat_args optional, fix dev mode.

This commit is contained in:
Florent Kermarrec 2021-10-26 15:16:43 +02:00
parent dab4845c9b
commit f6562195d5
1 changed files with 9 additions and 8 deletions

View File

@ -224,13 +224,14 @@ def main():
parser.add_argument("--gcc", default=None, help="Download/Extract GCC Toolchain (riscv, powerpc, openrisc or lm32).") parser.add_argument("--gcc", default=None, help="Download/Extract GCC Toolchain (riscv, powerpc, openrisc or lm32).")
# Development mode. # 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. # 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() args = parser.parse_args()
# Handle compat_args. # Handle compat_args.
if args.compat_args is not None:
for arg in args.compat_args: for arg in args.compat_args:
if arg in ["init", "update", "install"]: if arg in ["init", "update", "install"]:
setattr(args, arg, True) setattr(args, arg, True)
@ -239,7 +240,7 @@ def main():
# Location/Auto-Update. # Location/Auto-Update.
litex_setup_location_check() litex_setup_location_check()
if args.dev: if not args.dev:
litex_setup_auto_update() litex_setup_auto_update()
# Init. # Init.