You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sledge/runtime/experiments/bash_libraries/validate_dependencies.sh

16 lines
315 B

# shellcheck shell=bash
if [ -n "$__validate_dependencies_sh__" ]; then return; fi
__validate_dependencies_sh__=$(date)
validate_dependencies() {
for required_binary in "$@"; do
if ! command -v "$required_binary" > /dev/null; then
echo "$required_binary is not present."
return 1
fi
done
return 0
}