From 38e9fe9c1c0fc9aa3273ccea03922b945ff9063a Mon Sep 17 00:00:00 2001 From: WMCB-Tech Date: Fri, 27 Aug 2021 19:04:46 +0800 Subject: [PATCH] remove setup android sdk script --- scripts/setup-android-sdk.sh | 43 ------------------------------------ 1 file changed, 43 deletions(-) delete mode 100755 scripts/setup-android-sdk.sh diff --git a/scripts/setup-android-sdk.sh b/scripts/setup-android-sdk.sh deleted file mode 100755 index 336aead..0000000 --- a/scripts/setup-android-sdk.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -set -e -u - -ANDROID_SDK_TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip" -ANDROID_SDK_ROOT="${HOME}/android-sdk" -TMP="$(mktemp -d)" - -# check if running under root -if [ "$(id -u)" == "0" ]; then - SUDO="" -else - SUDO="sudo -Es" -fi - -# install dependencies -${SUDO} bash -c \ - "apt install curl file unzip || pacman -S curl file unzip --needed || dnf install curl file unzip" - -# check java in PATH -if ! "$(command -v java)" !>/dev/null 2>&1; then - echo "No java on your device is installed! please install openjdk. version 8 is recommended" - exit 2 -fi - -# setup android sdk -curl --fail --location "${ANDROID_SDK_TOOLS_URL}" \ - --output "${TMP:-/tmp}/sdk.zip" -unzip -d "${ANDROID_SDK_ROOT}" "${TMP:-/tmp}/sdk.zip" -qq - -# accept licenses -yes | "${ANDROID_SDK_ROOT}"/cmdline-tools/bin/sdkmanager --licenses \ - --sdk_root="${ANDROID_SDK_ROOT}" - -if [ "${?}" == "0" ]; then - cat <<- EOL - Success installing Android SDK tools! - - At this point you can specify the ANDROID_HOME variable to ${ANDROID_SDK_ROOT} - EOL -else - echo "An error has occured during the installation" - exit 2 -fi