Skip to content

Instantly share code, notes, and snippets.

@JanithaR
Created April 7, 2020 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JanithaR/7ef9c4582d9d68967c856cac925c70bd to your computer and use it in GitHub Desktop.
Save JanithaR/7ef9c4582d9d68967c856cac925c70bd to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "$DIR/helper.sh"
open -a "React Native Debugger"
print_green_text 'Which simulator do you want to open?'
device=''
options=("Nexus_6_API_23" "Pixel_API_24" "Pixel_2_API_26" "Pixel_3_API_28" "Samsung_Galaxy_Xcover_4_API_28" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Nexus_6_API_23")
device="Nexus_6_API_23"
break
;;
"Pixel_API_24")
device="Pixel_API_24"
break
;;
"Pixel_2_API_26")
device="Pixel_2_API_26"
break
;;
"Pixel_3_API_28")
device="Pixel_3_API_28"
break
;;
"Samsung_Galaxy_Xcover_4_API_28")
device="Samsung_Galaxy_Xcover_4_API_28"
break
;;
"Quit")
exit
;;
*) echo "invalid option $REPLY";;
esac
done
print_green_text "Booting $device..."
# https://developer.android.com/studio/run/emulator-commandline
emulator -no-snapshot @"$device"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment