Commit 2601c606 authored by gsell's avatar gsell

Pmodules/modbuild

- fix bug in handling --release option
parent be2f6d7c
......@@ -26,6 +26,15 @@ declare -x LIBRARY_PATH
declare -x LD_LIBRARY_PATH
declare -x DYLD_LIBRARY_PATH
is_release() {
[[ :${releases}: =~ :$1: ]] && return 0
std::die 1 "${P}: '$1' is not a valid release name."
}
pbuild::set_release() {
is_release "$1" && MODULE_RELEASE="$1"
}
##############################################################################
#
# set supported OS
......@@ -36,7 +45,7 @@ pbuild::supported_os() {
for os in "$@"; do
[[ ${os} == ${OS} ]] && return 0
done
std::die 0 "${P}: Not available for ${OS}."
std::die 1 "${P}: Not available for ${OS}."
}
##############################################################################
......
......@@ -176,8 +176,8 @@ force_rebuild='no'
dry_run='no'
enable_cleanup_build='yes'
enable_cleanup_src='no'
target='all'
module_release=''
# array collecting all modules specified on the command line via '--with=module'
with_modules=()
......@@ -224,7 +224,7 @@ while (( $# > 0 )); do
dry_run='yes'
;;
--release=* )
MODULE_RELEASE=${1/--release=}
module_release=${1/--release=}
;;
--with=*/* )
with_modules+=( ${1/--with=} )
......@@ -328,13 +328,15 @@ _P=$(echo $P | tr [:lower:] [:upper:])
_P=${_P//-/_}
_V=${_P}_VERSION
# :FIXME: do we need this? Can we get rid of 'releases'?
if [[ -n ${PMODULES_DEFINED_RELEASES} ]]; then
declare -r releases="${PMODULES_DEFINED_RELEASES}"
else
# set defaults, if file doesn't exist or isn't readable
# set defaults
declare -r releases=":unstable:stable:deprecated:"
fi
[[ -n ${module_release} ]] && pbuild::set_release "${module_release}"
#
# run build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment