Fall back to .config.yaml if no configuration file given

Make the configuration file on the command line optional and fall back
to trying to open the generated .config.yaml instead. This allows the
sequence

kas menu -> save & exit
kas build
kas shell
kas ...

and also makes rebuilding the self-configured image simpler.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka
2021-07-12 08:47:34 +02:00
parent 1271320de3
commit 5fb9067894
4 changed files with 34 additions and 23 deletions

View File

@@ -363,7 +363,10 @@ def ssh_no_host_key_check():
def setup_parser_common_args(parser):
parser.add_argument('config',
help='Config file')
help='Config file, using .config.yaml if none is '
'specified and using the current directory as '
'repository anchor',
nargs='?')
parser.add_argument('--skip',
help='Skip build steps',
default=[])