#!/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