From 590cf993c0e9e9286008978e1ab282518d8dc78c Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Mon, 6 Dec 2021 09:11:25 +0100 Subject: [PATCH] Replace source call to make scripts more portable (#12014) Fixes #10744 Fixes: ./bin/node.sh: 44: ./bin/node.sh: source: not found Could not find java - please run /opt/druid/apache-druid-0.20.0/bin/verify-java to confirm it is installed. --- examples/bin/jconsole.sh | 2 +- examples/bin/node.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bin/jconsole.sh b/examples/bin/jconsole.sh index f3420ad7bb9..b14a2aa63d0 100755 --- a/examples/bin/jconsole.sh +++ b/examples/bin/jconsole.sh @@ -45,7 +45,7 @@ wait WHEREAMI="$(dirname "$0")" WHEREAMI="$(cd "$WHEREAMI" && pwd)" -JAVA_BIN_DIR="$(source "$WHEREAMI"/java-util && get_java_bin_dir)" +JAVA_BIN_DIR="$(. /"$WHEREAMI"/java-util && get_java_bin_dir)" if [ -z "$JAVA_BIN_DIR" ]; then >&2 echo "Could not find java - please run $WHEREAMI/verify-java to confirm it is installed." exit 1 diff --git a/examples/bin/node.sh b/examples/bin/node.sh index db51ba78063..afa0eb079e1 100644 --- a/examples/bin/node.sh +++ b/examples/bin/node.sh @@ -40,7 +40,7 @@ CONF_DIR="${DRUID_CONF_DIR:=conf/druid}" PID_DIR="${DRUID_PID_DIR:=var/druid/pids}" WHEREAMI="$(dirname "$0")" WHEREAMI="$(cd "$WHEREAMI" && pwd)" -JAVA_BIN_DIR="$(source "$WHEREAMI"/java-util && get_java_bin_dir)" +JAVA_BIN_DIR="$(. /"$WHEREAMI"/java-util && get_java_bin_dir)" # Remove possilble ending slash LOG_DIR="${DRUID_LOG_DIR:=${WHEREAMI}/log}"