From 76459a39cdc6f35485a867fd96c7cce29a2cc6b9 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Mon, 4 May 2020 13:10:42 +0100 Subject: clean: tweak init `Init_config_data` is more suited to build scripts than here. note that it's not used in `config` either. this deliberately does not pass along arguments to it because `Arguments()` can only handle the basic common options, not the `clean` set. this is somewhat confusing and causes a pointless execution of `getopt`. furthermore the function is expanding slightly further beyond it's original scope, with yet more change coming that's unsuitable for `clean`, so it makes sense to avoid using the function here just for the couple of function calls needed. validation of the config is disabled, as it is not performed currently. it is not clear if it should be enabled or not for `clean`. it may be useful to not validate, if we wish to be able to provide users with an option to be able to delete the config. Gbp-Dch: Ignore --- scripts/build/clean | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/build') diff --git a/scripts/build/clean b/scripts/build/clean index aa5727944..9ff67cbab 100755 --- a/scripts/build/clean +++ b/scripts/build/clean @@ -26,9 +26,10 @@ DESCRIPTION="Clean up system build directories" HELP="" USAGE="${PROGRAM} [--all] [--cache] [--chroot] [--binary] [--purge] [--remove] [--stage] [--source]" -# Processing arguments and configuration files -# Note: Deliberately not passing parameters through to Arguments function call here! -Init_config_data +# Reading, preparing and validating config +Read_conffiles $(Common_conffiles) +Prepare_config +#Validate_config # Avoiding cases were users accidentally nuke their config/binary if [ ! -d config ] && [ "$(basename ${PWD})" = "config" ] -- cgit v1.2.3