diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 4770e9e..f104874 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -301,7 +301,11 @@ pbuild::module_is_avail() { pbuild::set_download_url() { local -i _i=${#SOURCE_URLS[@]} SOURCE_URLS[_i]="$1" - SOURCE_NAMES[_i]="$2" + if (( $# == 2 )); then + SOURCE_NAMES[$_i]="$2" + else + SOURCE_NAMES[$_i]='' + fi } pbuild::set_sha256sum() { @@ -691,7 +695,7 @@ pbuild::make_all() { #...................................................................... check_supported_systems() { - [[ -z "${SUPPORTED_SYSTEMS}" ]] && return 0 + (( ${#SUPPORTED_SYSTEMS[@]} == 0 )) && return 0 for sys in "${SUPPORTED_SYSTEMS[@]}"; do [[ ${sys,,} == ${system,,} ]] && return 0 done @@ -702,7 +706,7 @@ pbuild::make_all() { #...................................................................... check_supported_os() { - [[ -z "${SUPPORTED_OS}" ]] && return 0 + (( ${#SUPPORTED_OS[@]} == 0 )) && return 0 for os in "${SUPPORTED_OS[@]}"; do [[ ${os,,} == ${OS,,} ]] && return 0 done @@ -713,7 +717,7 @@ pbuild::make_all() { #...................................................................... check_supported_compilers() { - [[ -z "${SUPPORTED_COMPILERS}" ]] && return 0 + (( ${#SUPPORTED_COMPILERS[@]} == 0 )) && return 0 for compiler in "${SUPPORTED_COMPILERS[@]}"; do [[ ${compiler,,} == ${COMPILER,,} ]] && return 0 done diff --git a/Pmodules/libstd.bash b/Pmodules/libstd.bash index 95e70c7..6a52073 100644 --- a/Pmodules/libstd.bash +++ b/Pmodules/libstd.bash @@ -20,7 +20,7 @@ std::error() { } std::debug() { - [[ ${PMODULES_DEBUG} ]] || return 0 + [[ -v PMODULES_DEBUG ]] || return 0 std::log 2 "$@" } diff --git a/Pmodules/modbuild.in b/Pmodules/modbuild.in index a36ef48..819b521 100755 --- a/Pmodules/modbuild.in +++ b/Pmodules/modbuild.in @@ -171,6 +171,8 @@ declare opt_verbose='no' # array collecting all modules specified on the command line via '--with=module' declare -a opt_with_modules=() +declare BUILD_SCRIPT='' + declare opt_ol_name_or_dir='' parse_args() {