Skip to content

Commit

Permalink
Fixes #5 Fix Emulator Not Found Error
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverspryn authored Feb 25, 2020
1 parent 9393f17 commit 6368ca9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions setup-emulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ currentDirController="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 &
source "$currentDirController/config.sh"
source "$installDestination/paths.sh"

alreadyHasAvd=$($installDestination/emulator/emulator -list-avds | grep -o "$emulatorDeviceName")

# Don't bother setting up the AVD again, if already done
if [[ "$alreadyHasAvd" == "" ]]; then
if [ -x "$(command -v $installDestination/emulator/emulator)" ]; then
alreadyHasAvd=$($installDestination/emulator/emulator -list-avds | grep -o "$emulatorDeviceName")

if [[ "$alreadyHasAvd" == "" ]]; then
source "$currentDirController/emulator/create-avd.sh"
fi
else
source "$currentDirController/emulator/create-avd.sh"
fi

Expand Down

0 comments on commit 6368ca9

Please sign in to comment.