diff --git a/inc_pluginfunctions b/inc_pluginfunctions index aabe5d83d22535aca7d37ff5a6b2e258e5158e0e..3740c11bd49efa373bcdc0eb3ad91dc53bfc1360 100644 --- a/inc_pluginfunctions +++ b/inc_pluginfunctions @@ -39,6 +39,7 @@ # 2023-06-22 v1.11 <axel.hahn@unibe.ch> fix ph.toUnit with float values; shell fixes # 2023-08-24 v1.12 <axel.hahn@unibe.ch> toUnit got 3rd param for count of digits after "." # 2023-08-30 v1.13 <axel.hahn@unibe.ch> reverse return code in ph.hasParamoption to unix like return codes: 0=true; <>0 = false +# 2023-09-05 v1.14 <axel.hahn@unibe.ch> ph.require - show error below status line # ====================================================================== @@ -62,10 +63,11 @@ function ph.abort(){ # check required binaries in the path # param(s) string name of binary to check with "which" command function ph.require(){ - which $* >/dev/null - if [ $? -ne 0 ]; then + local _out; + if ! _out=$( which $* 2>&1 ); then ph.setStatus "unknown" ph.status "$0 requires the following tools to run: $*" + echo "$_out" ph.exit fi }