Initially only stdout was redirected to silence case when 'type'
succeeds. However when 'type' fails to find something, it logs
that to stderr, however makoctl does proper error reporting when
something is missing anyway, thus 'type' stderr could be
suppressed.
---
makoctl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/makoctl b/makoctl
index 5b9d01a..dd0aa16 100755
--- a/makoctl+++ b/makoctl
@@ -26,10 +26,10 @@ usage() {
}
BUSCTL=busctl
-if ! type $BUSCTL > /dev/null; then+if ! type $BUSCTL > /dev/null 2>&1; then BUSCTL=basuctl
fi
-if ! type $BUSCTL > /dev/null; then+if ! type $BUSCTL > /dev/null 2>&1; then echo >&2 "$0: busctl or basuctl is required"
exit 1
fi
@@ -98,7 +98,7 @@ case "$1" in
;;
"menu")
shift 1
- if ! type jq > /dev/null; then+ if ! type jq > /dev/null 2>&1; then echo >&2 "$0: jq is required to use 'menu'"
exit 1
fi
--
2.26.2