From 9077161b14bff5941879a93d49abf1483e32469d Mon Sep 17 00:00:00 2001 From: John Whelan Date: Mon, 17 Jul 2023 15:10:15 -0700 Subject: [PATCH 1/2] Added ability to skip install of android SDK when running prerequisites script, and skip checking android config in setup_linux.sh --- install_linux_prerequisites.sh | 18 +++++++++++++++++- setup_linux.sh | 11 +++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/install_linux_prerequisites.sh b/install_linux_prerequisites.sh index 202ddf50..e804a928 100755 --- a/install_linux_prerequisites.sh +++ b/install_linux_prerequisites.sh @@ -14,6 +14,12 @@ sudo apt install -y openjdk-11-jdk-headless iproute2 curl build-essential cmake curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -c clippy --profile default source "$HOME/.cargo/env" +#ask if they want to install optional android sdk (and install if yes) +while true; do +read -p "Do you want to install Android SDK (optional) Y/N) " response + +case $response in +[yY] ) echo Installing Android SDK...; # Install Android SDK mkdir $HOME/Android; mkdir $HOME/Android/Sdk curl -o $HOME/Android/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip @@ -29,5 +35,15 @@ export PATH=\$PATH:\$HOME/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/ export ANDROID_NDK_HOME=\$HOME/Android/Sdk/ndk/25.1.8937393 export ANDROID_SDK_ROOT=\$HOME/Android/Sdk END +break ;; +[nN] ) echo Skipping Android SDK; +cat >> $HOME/.profile < /dev/null; then echo '[X] rustup is available in the path' From 2a58a8c847afb0242f8c5d5c570833618d9c242a Mon Sep 17 00:00:00 2001 From: John Whelan Date: Tue, 18 Jul 2023 15:48:03 -0700 Subject: [PATCH 2/2] Updated setup_macos.sh to ask if Android SDK has been installed - if it hasn't then skip those checks. Also updated setup_linux.sh to fix a minor bug with the check done there. --- setup_linux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup_linux.sh b/setup_linux.sh index 47bb632e..7aafc081 100755 --- a/setup_linux.sh +++ b/setup_linux.sh @@ -12,8 +12,9 @@ if [ "$(lsb_release -d | grep -qEi 'debian|buntu|mint')" ]; then echo Not a supported Linux exit 1 fi -read -p "Did you install Android SDK? Y/N " response while true; do +read -p "Did you install Android SDK? Y/N " response + case $response in [yY] ) echo Checking android setup...;