Enable to specify port

This commit is contained in:
butomo1989 2018-06-19 01:20:15 +02:00
parent b7f332fd3b
commit 32258461be
2 changed files with 11 additions and 3 deletions

3
genymotion/example/sample_devices/devices.json Normal file → Executable file
View file

@ -1,7 +1,8 @@
[
{
"template": "Samsung Galaxy S7 - 6.0.0 - API 23 - 1440x2560",
"device": "SamsungS7V6"
"device": "SamsungS7V6",
"port": 38727
},
{
"template": "Google Nexus 6 - 8.0 - API 26 - 1440x2560",

View file

@ -20,8 +20,15 @@ function prepare_geny_cloud() {
template=$(get_value '.template')
device=$(get_value '.device')
port=$(get_value '.port')
if [[ $port != null ]]; then
echo "Starting \"$device\" with template name \"$template\" on port \"$port\"..."
gmtool --cloud admin startdisposable "${template}" "${device}" --adb-serial-port "${port}"
else
echo "Starting \"$device\" with template name \"$template\"..."
gmtool --cloud admin startdisposable "${template}" "${device}"
fi
done
}