From fad9da23ac1efe6e9a0bb1b840bc777530645cf9 Mon Sep 17 00:00:00 2001 From: xdavidwu Date: Mon, 7 Feb 2022 11:37:44 +0800 Subject: [PATCH] bash: android: ANDROID_SDK_ROOT compat --- .bash_profile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.bash_profile b/.bash_profile index 9458137..3bdaf23 100644 --- a/.bash_profile +++ b/.bash_profile @@ -52,10 +52,14 @@ export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 export GTK_IM_MODULE=wayland export QT_IM_MODULE=fcitx -if [ ! -d "$ANDROID_HOME" ] && [ ! -d "$ANDROID_SDK_ROOT" ] && [ -d ~/android-sdk ]; then - export ANDROID_SDK_ROOT=~/android-sdk - # platform-tools also contains stuff like mke2fs, sqlite3 - PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools" +if [ ! -d "$ANDROID_HOME" ]; then + if [ ! -d "$ANDROID_SDK_ROOT" ] && [ -d ~/android-sdk ]; then + export ANDROID_SDK_ROOT=~/android-sdk + # platform-tools also contains stuff like mke2fs, sqlite3 + PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools" + fi +else + export ANDROID_SDK_ROOT="$ANDROID_HOME" fi [[ -f ~/.bashrc ]] && . ~/.bashrc -- 2.43.0