envsetup: dopush: allow (symbolic) host names for adb connect
Change-Id: Icfab874abab64b0a3e5e63091cb6c25dd9630737 Signed-off-by: Marc K <morckx@gmail.com>
This commit is contained in:
@@ -789,7 +789,8 @@ function dopush()
|
||||
if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD") || [ "$FORCE_PUSH" = "true" ];
|
||||
then
|
||||
# retrieve IP and PORT info if we're using a TCP connection
|
||||
TCPIPPORT=$(adb devices | egrep '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+[^0-9]+' \
|
||||
TCPIPPORT=$(adb devices \
|
||||
| egrep '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]):[0-9]+[^0-9]+' \
|
||||
| head -1 | awk '{print $1}')
|
||||
adb root &> /dev/null
|
||||
sleep 0.3
|
||||
|
Reference in New Issue
Block a user