diff --git a/tools/villas b/tools/villas index 8ed5d32be..2079dcd8c 100755 --- a/tools/villas +++ b/tools/villas @@ -22,8 +22,8 @@ SUBTOOL=$1 ARGS=${@:2} # Check if tool is available -if ! echo ${SUBTOOLS} | grep -w -q ${SUBTOOL}; then - echo "Usage: villas [TOOL]" +if ! echo ${SUBTOOLS} | grep -wqFe "${SUBTOOL}"; then + echo "Usage: villas [-h | --help | TOOL]" echo " TOOL is one of ${SUBTOOLS}" echo echo "For detailed documentation, please see: 'villas node'" @@ -32,7 +32,8 @@ if ! echo ${SUBTOOLS} | grep -w -q ${SUBTOOL}; then # Show VILLASnode copyright and contact info villas-node -h | tail -n3 - exit 1 + echo "-h" "--help" | grep -wqFe "${SUBTOOL}" + exit $? fi exec villas-${SUBTOOL} ${ARGS}