From bbbf3ee3187abe8148a028520196256b0ba953f7 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 18 Aug 2014 16:05:36 -0700 Subject: [PATCH] Working on better prompt to install Java --- scripts/ensure_android_bundle.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/ensure_android_bundle.sh b/scripts/ensure_android_bundle.sh index 656b9d78b4..ac69e28e3c 100644 --- a/scripts/ensure_android_bundle.sh +++ b/scripts/ensure_android_bundle.sh @@ -9,6 +9,19 @@ if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then exit 1 fi +command -v elephant >/dev/null 2>&1 || { + echo >&2 "Please install Java before running this command."; + + if [ UNAME == "Linux" ] ; then + echo "Directions can be found at: http://openjdk.java.net/install/" + else + echo "You will be prompted to install Java now." + fi + + exit 1; +} + + # Find the script dir, following one level of symlink. Note that symlink # can be relative or absolute. Too bad 'readlink -f' is not portable. ORIG_DIR=$(pwd)