From 4a454f08176e20596c9e110c6f6fe952deb8064b Mon Sep 17 00:00:00 2001 From: fabianu Date: Sat, 20 Jun 2020 16:40:36 +0200 Subject: [PATCH] Added ANDROID_STUDIO as optional variable to specify android studio location. --- CONTRIBUTING.md | 6 +++++- tools/templates/configure.sh | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b36843adee..c647a46da9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,11 @@ An Android Studio template has been added to the project to help creating all fi To install the template (to be done only once): - Go to folder `./tools/template`. -- Run the script `./configure.sh`. +- Mac OSX: Run the script `./configure.sh`. + + Linux: Run `ANDROID_STUDIO=/path/to/android-studio ./configure` + - e.g. `ANDROID_STUDIO=/usr/local/android-studio ./configure` + - Restart Android Studio. To create a new screen: diff --git a/tools/templates/configure.sh b/tools/templates/configure.sh index eb2aa0dbec..de7fe7da81 100755 --- a/tools/templates/configure.sh +++ b/tools/templates/configure.sh @@ -17,8 +17,9 @@ # echo "Configure RiotX Template..." +if [ -z ${ANDROID_STUDIO+x} ]; then ANDROID_STUDIO="/Applications/Android Studio.app/Contents"; fi { -ln -s $(pwd)/RiotXFeature /Applications/Android\ Studio.app/Contents/plugins/android/lib/templates/other +ln -s $(pwd)/RiotXFeature "${ANDROID_STUDIO%/}/plugins/android/lib/templates/other" } && { echo "Please restart Android Studio." }