@@ -103,8 +103,8 @@ set -o nounset # Treat unset variables as an error
...
@@ -103,8 +103,8 @@ set -o nounset # Treat unset variables as an error
set-e
set-e
check_argument_count(){
check_argument_count(){
local count=$1
local count="$1"
local expected=$2
local expected="$2"
if["${count}"-ne"${expected}"];then
if["${count}"-ne"${expected}"];then
error "called function ${FUNCNAME[1]} expected ${expected} params, but got ${count} by caller function ${FUNCNAME[2]} (line ${BASH_LINENO[2]})"
error "called function ${FUNCNAME[1]} expected ${expected} params, but got ${count} by caller function ${FUNCNAME[2]} (line ${BASH_LINENO[2]})"
exit 1
exit 1
...
@@ -112,7 +112,7 @@ check_argument_count() {
...
@@ -112,7 +112,7 @@ check_argument_count() {
}
}
check_argument_notempty(){
check_argument_notempty(){
local param=$1
local param="$1"
if[-z"${param}"];then
if[-z"${param}"];then
error "called function ${FUNCNAME[1]} expected non-empty params, but some are empty set in line ${BASH_LINENO[0]}, eventually taken from caller function ${FUNCNAME[1]} (line ${BASH_LINENO[1]})"
error "called function ${FUNCNAME[1]} expected non-empty params, but some are empty set in line ${BASH_LINENO[0]}, eventually taken from caller function ${FUNCNAME[1]} (line ${BASH_LINENO[1]})"