aboutsummaryrefslogtreecommitdiff
path: root/tear-down.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tear-down.sh')
-rwxr-xr-xtear-down.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/tear-down.sh b/tear-down.sh
index 3211aea..a6ac6b9 100755
--- a/tear-down.sh
+++ b/tear-down.sh
@@ -1,11 +1,16 @@
#!/bin/bash
IPADDR=`cat IPADDR`
-adb devices
-expr "$IPADDR" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$'
-if [ $? -eq 0 ]
+# Skip adb disconnect steps on Linux.
+grep "^device = '.*_linux'" ./config.py
+if [ $? -ne 0 ]
then
- echo "Disconnecting adb from $IPADDR:5555"
- adb disconnect $IPADDR:5555
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