oi-build: fixes for lazy user (providing no arguments)

This commit is contained in:
Mads Meisner-Jensen
2021-06-16 17:34:33 +02:00
parent 5c0252e2a6
commit c68ba8a958
2 changed files with 10 additions and 1 deletions

View File

@@ -233,6 +233,10 @@ Without any options, info is shown for the last image built.
EOF
}
# if user does not provide config name, we default to config_name
load_config common
load_config ${config_name}
actions=""
dryrun=""
while [ -n "$1" ]; do
@@ -264,6 +268,10 @@ echo_ok "actions = ${actions}"
todo_action fetch &&
fetch_image_builder
if [ -z "${actions}" ] && [ ! -d ${imagebuilder_dir} ]; then
die "No action supplied"
fi
echo_run_nodry "cd ${imagebuilder_dir}"
todo_action build &&