+# helper function for check() in module-setup.sh
+# to check for required installed binaries
+# issues a standardized warning message
+require_binaries() {
+ local _module_name="${moddir##*/}"
+ local _ret=0
+
+ if [[ "$1" = "-m" ]]; then
+ _module_name="$2"
+ shift 2
+ fi
+
+ for cmd in "$@"; do
+ if ! find_binary "$cmd" &>/dev/null; then
+ dwarning "$_module_name: Could not find command '$cmd'!"
+ ((_ret++))
+ fi
+ done
+ return $_ret
+}
+
+require_any_binary() {
+ local _module_name="${moddir##*/}"
+ local _ret=1
+
+ if [[ "$1" = "-m" ]]; then
+ _module_name="$2"
+ shift 2
+ fi
+
+ for cmd in "$@"; do
+ if find_binary "$cmd" &>/dev/null; then
+ _ret=0
+ break
+ fi
+ done
+
+ if (( $_ret != 0 )); then
+ dwarning "$_module_name: Could not find any command of '$@'!"
+ return 1
+ fi
+
+ return 0
+}
+