Merge branch '247-add-a-clean-installation-option-to-build-script' into 'master'

Resolve "Add a "clean installation" option to build script"

Closes #247

See merge request Pmodules/src!225
This commit is contained in:
2024-04-15 17:16:32 +02:00
3 changed files with 17 additions and 0 deletions
+3
View File
@@ -12,6 +12,9 @@
suffix. (issue #248)
### build-system
* Option '--clean-install' added. If this option is set, the
module is removed before building, if the module already
exist. (issue #247)
## Version 1.1.18
### modulecmd
+7
View File
@@ -1797,6 +1797,13 @@ _build_module() {
fi
install_release_file
else
if [[ "${opt_clean_install,,}" == 'yes' ]]; then
std::info \
"%s " \
"${module_name}/${module_version}:" \
"remove module, if already exists ..."
remove_module
fi
std::info \
"%s " \
"${module_name}/${module_version}:" \
+7
View File
@@ -86,6 +86,9 @@ SELECT VARIANT TO BUILD:
BUILD-STEPS OPTIONS:
--clean-install
Remove module if already exist before building.
--prep
Prepare sources: unpack sources and apply patches only.
@@ -184,6 +187,7 @@ declare -- opt_config_file=''
declare -- opt_debug='no'
declare -- opt_yaml='yes'
declare -- opt_variant=''
declare -- opt_clean_install='no'
declare -- BUILD_SCRIPT=''
declare -- yaml_config_file=''
@@ -299,6 +303,9 @@ parse_args() {
--prep | --configure | --compile | --install | --all )
opt_build_target=${1:2}
;;
--clean-install )
opt_clean_install='yes'
;;
--update-modulefiles )
opt_update_modulefiles='yes'
;;