Created
February 3, 2017 11:07
-
-
Save jrodbx/2ed09360146a34564efc20ad5de71e1f to your computer and use it in GitHub Desktop.
Genymotion Emulator Starter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GMTOOL=/Applications/Genymotion.app/Contents/MacOS/gmtool | |
UUIDS=() | |
NAMES=() | |
INDEX=0 | |
while read -r line; do | |
UUIDS[${#UUIDS[@]}]=$(echo -n $line | cut -f1 -d'|') | |
NAME=$(echo -n $line | cut -f2 -d'|') | |
NAMES[${#NAMES[@]}]=$NAME | |
if [[ $# -eq 0 ]] ; then | |
((INDEX++)) | |
echo "$INDEX) $NAME" | |
fi | |
done < <($GMTOOL admin list | sed 1,2d | cut -c28-64,66-) | |
if [[ $# -eq 0 ]] ; then | |
echo -en "\nSelect emulator: " | |
read EMULATOR | |
else | |
EMULATOR=$1 | |
fi | |
((EMULATOR--)) | |
echo "Starting \"${NAMES[$EMULATOR]}\"" | |
$GMTOOL admin start "${UUIDS[$EMULATOR]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment