mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 10:03:08 +02:00
accessing unset variables fixed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -20,7 +20,7 @@ std::error() {
|
||||
}
|
||||
|
||||
std::debug() {
|
||||
[[ ${PMODULES_DEBUG} ]] || return 0
|
||||
[[ -v PMODULES_DEBUG ]] || return 0
|
||||
std::log 2 "$@"
|
||||
}
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user