aboutsummaryrefslogtreecommitdiff
path: root/tear-down.sh
blob: a6ac6b9f0068e257adf6793c00822820a3314f88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

IPADDR=`cat IPADDR`
# Skip adb disconnect steps on Linux.
grep "^device = '.*_linux'" ./config.py
if [ $? -ne 0 ]
then
    adb devices
    expr "$IPADDR" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$'
    if [ $? -eq 0 ]
    then
        echo "Disconnecting adb from $IPADDR:5555"
        adb disconnect $IPADDR:5555
        adb devices
    fi
fi