Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash
- INPUT=${1:-"-1"}
- LIST=($(emulator -list-avds))
- SELECTED=$(($INPUT))
- SIZE=${#LIST[@]}
- if [ $SELECTED -lt $SIZE ] && [ $SELECTED -gt -1 ]; then
- emulator @${LIST[$SELECTED]} -dns-server 8.8.8.8
- exit
- fi
- echo "Select emulator (usage emu.sh #)"
- for i in $(seq 0 $(($SIZE - 1))); do
- echo $i": "${LIST[$i]}
- done
Add Comment
Please, Sign In to add comment