do not assert missing files. git will create them in <clone>
This commit is contained in:
parent
f080f34bb3
commit
52271bef21
@ -82,23 +82,23 @@ if [ "${general_utils_sourced:-1}" = "1" ]; then # include only once
|
||||
}
|
||||
|
||||
assert_s () {
|
||||
if [ -z ${!1} ]; then
|
||||
log_fatal "$1 not set"
|
||||
fi
|
||||
# if [ -z ${!1} ]; then
|
||||
# log_fatal "$1 not set"
|
||||
# fi
|
||||
log_debug "$1=${!1}"
|
||||
}
|
||||
|
||||
assert_d () {
|
||||
if [ ! -d ${!1} ]; then
|
||||
log_fatal "$1 does not exist"
|
||||
fi
|
||||
# if [ ! -d ${!1} ]; then
|
||||
# log_fatal "$1 does not exist"
|
||||
# fi
|
||||
log_debug "$1=${!1}"
|
||||
}
|
||||
|
||||
assert_f () {
|
||||
if [ ! -f ${!1} ]; then
|
||||
log_fatal "$1 does not exist"
|
||||
fi
|
||||
# if [ ! -f ${!1} ]; then
|
||||
# log_fatal "$1 does not exist"
|
||||
# fi
|
||||
log_debug "$1=${!1}"
|
||||
}
|
||||
|
||||
@ -106,9 +106,9 @@ if [ "${general_utils_sourced:-1}" = "1" ]; then # include only once
|
||||
local readonly __m="${1}[@]"
|
||||
local readonly __n=(${!__m})
|
||||
local __len=${#__n[@]}
|
||||
if [ $__len -eq 0 ]; then
|
||||
log_fatal "$1 not set"
|
||||
fi
|
||||
# if [ $__len -eq 0 ]; then
|
||||
# log_fatal "$1 not set"
|
||||
# fi
|
||||
log_debug "$1=$__n"
|
||||
}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user