From 3ec952dbc5f77db388c119be2c184bac82c735ed Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Wed, 6 Apr 2022 09:29:24 +0200 Subject: [PATCH] modbuild: revert change which made --overlay a synonym of --system --- Pmodules/modbuild.in | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index d55d3f4..17cfb84 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -233,12 +233,21 @@ parse_args() { --tmpdir=* ) PMODULES_TMPDIR="${1/--tmpdir=}" ;; - --system | --overlay ) - opt_system="$2" - shift + --system | --system=* ) + if [[ $1 == *=* ]]; then + opt_system="${1#--*=}" + else + opt_system="$2" + shift + fi ;; - --system=* | --overlay=* ) - opt_system="${1/*=}" + --overlay | --overlay=* ) + if [[ $1 == *=* ]]; then + opt_overlay="${1#--*=}" + else + opt_overlay="$2" + shift + fi ;; --use-flags ) USE_FLAGS="y:$2:" @@ -455,6 +464,11 @@ build_modules_yaml(){ pattern+=" && /${m//\//\\/}( |$)/" done + # precidency: + # 1. overlay passed as argument + # 2. overlay defined for the variant + # 3. default in variants file + # 4. default overlay local ol_name_or_dir=$(yaml_get_overlay) get_ol_info "${ol_name_or_dir}" \ ol_name \