do not assert missing files. git will create them in <clone>

This commit is contained in:
Gerhard Hoffmann 2023-03-30 13:40:53 +02:00
parent f080f34bb3
commit 52271bef21

View File

@ -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