modbuild: test for bash 5 or later, otherwise abort

This commit is contained in:
2022-06-09 14:21:15 +02:00
parent e52a03ff14
commit 5337160b7a
+8
View File
@@ -34,6 +34,14 @@ source libstd.bash || {
echo "Oops: cannot source library -- '$_'" 1>&2; exit 3;
}
if (( ${BASH_VERSINFO[0]} < 5 )); then
std::info "bash >= 5 is required! You are running bash ${BASH_VERSION} ..."
std::info "Make sure that bash >= 5 is in your PATH."
std::info "bash >= 5 is available as Pmodule:"
std::info " module load System:bash"
std::die 3 ""
fi
std::def_cmds "${path}" \
'awk' 'base64' 'find' 'getopt' 'logger' 'mktemp' \
'rm' 'sort' 'find' 'yq'