From 93b118a27758eea5cddf14baa17bfcaaaa69dcff Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 19 Aug 2024 22:49:14 -0700 Subject: [PATCH] Remove version printing on linux (#71) * It's on stderr and noisy Signed-off-by: Ryan Friedman Co-authored-by: Antonio Cuadros <49162117+Acuadros95@users.noreply.github.com> Co-authored-by: Pablo Garrido --- scripts/microxrceddsgen | 4 +--- scripts/microxrceddsgen.in | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/scripts/microxrceddsgen b/scripts/microxrceddsgen index 81ea868..89b3b34 100755 --- a/scripts/microxrceddsgen +++ b/scripts/microxrceddsgen @@ -4,9 +4,7 @@ dir="`dirname \"$0\"`" java_exec=java -java -version &>/dev/null - -if [ $? != 0 ]; then +if ! hash ${jave_exec}; then [ -z "$JAVA_HOME" ] && { echo "Java binary cannot be found. Please, make sure its location is in the PATH environment variable or set JAVA_HOME environment variable."; exit 1; } java_exec="${JAVA_HOME}/bin/java" fi diff --git a/scripts/microxrceddsgen.in b/scripts/microxrceddsgen.in index 5502d21..0175426 100644 --- a/scripts/microxrceddsgen.in +++ b/scripts/microxrceddsgen.in @@ -4,9 +4,7 @@ dir="`dirname \"$0\"`" java_exec=java -java -version &>/dev/null - -if [ $? != 0 ]; then +if ! hash ${jave_exec}; then [ -z "$JAVA_HOME" ] && { echo "Java binary cannot be found. Please, make sure its location is in the PATH environment variable or set JAVA_HOME environment variable."; exit 1; } java_exec="${JAVA_HOME}/bin/java" fi