mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 18:13:08 +02:00
Merge branch '277-build-system-use-string-for-versions-to-build' into 'master'
Resolve "build-system: use string for versions to build" Closes #277 See merge request Pmodules/src!255
This commit is contained in:
@@ -169,7 +169,7 @@ DOCUMENTATION:
|
||||
declare -r ARGS="$@"
|
||||
|
||||
# versions to be build, '.*' or none means all
|
||||
declare -a versions=()
|
||||
declare versions_to_build=''
|
||||
declare opt_build_target='all'
|
||||
declare opt_dry_run='no'
|
||||
declare opt_enable_cleanup_build='yes'
|
||||
@@ -208,7 +208,6 @@ parse_args() {
|
||||
# the build-script MUST be passed as first argument.
|
||||
#
|
||||
(( $# == 0 )) && usage
|
||||
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
-j )
|
||||
@@ -356,11 +355,10 @@ parse_args() {
|
||||
BUILDBLOCK_DIR=$(dirname "${BUILD_SCRIPT}")
|
||||
elif [[ "${arg}" == */* ]]; then
|
||||
module_name="${arg%/*}"
|
||||
versions+=( {arg#*/} )
|
||||
versions_to_build+=" ${arg#*/}"
|
||||
else
|
||||
versions+=( "$1" )
|
||||
versions_to_build+=" $1"
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
@@ -371,8 +369,8 @@ parse_args() {
|
||||
"Build script argument missing?"
|
||||
|
||||
# if no version is specified on the cmd-line, build all versions
|
||||
(( ${#versions[@]} > 0)) || versions+=( '.*' )
|
||||
|
||||
#(( ${#versions_to_build[@]} > 0)) || versions_to_build+=( '.*' )
|
||||
[[ -z ${versions_to_build} ]] && versions_to_build='.*'
|
||||
# set system if not set on the cmd-line
|
||||
opt_system="${opt_system:-$(std::get_os_release)}"
|
||||
|
||||
@@ -1568,7 +1566,7 @@ if [[ -z ${module_name} ]]; then
|
||||
module_name=${fname[${#fname[@]}-2]}
|
||||
fi
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
for version in ${versions_to_build}; do
|
||||
build_modules "${module_name}" "${version}" "${opt_with_modules[@]}"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user