mirror of
https://github.com/QuasarApp/sdkmanager-android.git
synced 2025-05-02 23:49:33 +00:00
fix #2 "move default sdk root to home folder"
This commit is contained in:
parent
a16f46c1af
commit
4a116daac5
@ -14,7 +14,7 @@
|
||||
### sdkmanager
|
||||
|
||||
The sdkmanager is a command line tool that allows you to view, install, update, and uninstall packages for the Android SDK. If you're using Android Studio, then you do not need to use this tool and you can instead manage your SDK packages from the IDE.
|
||||
The sdkmanager tool is provided in the Android SDK Tools package (25.2.3 and higher) and is located in ~/snap/androidsdk/current/tools/bin/.
|
||||
The sdkmanager tool is provided in the Android SDK Tools package (25.2.3 and higher) and is located in ~/AndroidSDK.
|
||||
|
||||
## Install
|
||||
|
||||
|
@ -1,11 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
SDK_ROOT=$HOME/AndroidSDK
|
||||
EXTERNAL_HOME=/home/$USER
|
||||
OLD_SDK_ROOT=$HOME/AndroidSDK
|
||||
SDK_ROOT=$EXTERNAL_HOME/AndroidSDK
|
||||
|
||||
export JAVA_HOME="$SNAP/usr/lib/jvm/java-8-openjdk-amd64"
|
||||
export ANDROID_SDK_HOME="$HOME/.Android"
|
||||
export _JAVA_OPTIONS=-Duser.home=$HOME
|
||||
|
||||
if [ "$(ls -A $OLD_SDK_ROOT)" ]; then
|
||||
echo "The default sdk folder has been changed from $OLD_SDK_ROOT to $SDK_ROOT ."
|
||||
echo "The Old location of sdk root have big problems with update the androidsdk package."
|
||||
echo "For more information about this problem see the https://github.com/QuasarApp/sdkmanager-android/issues/2 issue."
|
||||
echo ""
|
||||
|
||||
if [ ! -d $SDK_ROOT ]
|
||||
then
|
||||
mkdir $SDK_ROOT
|
||||
fi
|
||||
|
||||
mv $OLD_SDK_ROOT $EXTERNAL_HOME
|
||||
ln -s $SDK_ROOT $OLD_SDK_ROOT
|
||||
echo "All your installed sdk files has been moved to new location."
|
||||
echo "If you want change a sdk location please use the --sdk_root option."
|
||||
|
||||
fi
|
||||
|
||||
for var in "$@"
|
||||
do
|
||||
if [[ $var == *"--sdk_root"* ]]; then
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: androidsdk
|
||||
version: '1.0.6.1'
|
||||
version: '1.1.0.0'
|
||||
summary: The package contains android sdkmanager.
|
||||
description: |
|
||||
This is snap version of console sdk manager for Android. For more information about sdkmanager see official google documentation git@github.com:EndrII/sdkmanager-android.git.
|
||||
|
Loading…
x
Reference in New Issue
Block a user