Skip to content

Commit

Permalink
Update run-instrumental-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ArsenyMalkov committed Dec 14, 2017
1 parent 8e9f4d3 commit 28e8ed6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions run-instrumental-test
Expand Up @@ -3,17 +3,15 @@
if type -p java; then
echo "Found Java executable in PATH."
_java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]
then
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]] ; then
echo "Found Java executable in JAVA_HOME."
_java="$JAVA_HOME/bin/java"
else
echo "No Java found. Download the latest JDK."
exit 0;
fi

if [[ "$_java" ]]
then
if [[ "$_java" ]] ; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
echo version "$version"
if [[ "$version" < "1.7" ]]; then
Expand All @@ -22,14 +20,12 @@ then
fi
fi

if [ ! -f "local.properties" ] && [ -z "${ANDROID_HOME+x}" ]
then
if [ ! -f "local.properties" ] && [ -z "${ANDROID_HOME+x}" ] ; then
echo "File local.properties not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable."
exit 0;
fi

if [ -z "${ANDROID_HOME+x}" ]
then
if [ -z "${ANDROID_HOME+x}" ] ; then
ANDROID_HOME=$(grep sdk.dir local.properties | cut -d= -f2)
fi

Expand Down

0 comments on commit 28e8ed6

Please sign in to comment.