summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2022-04-27 12:59:34 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2022-04-27 12:59:34 +0800
commita21a2c80f4eca99bc1323e3d2087c0fd9ace480f (patch)
tree09a1e92027d86a8242e4b7bce49f8c3a29c06cde
parent22aea520416d62cac41cce87764f399a9aa60ac7 (diff)
deploy scripts: wait if there is no fastboot devices
so that we don't need to rerun again Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-xandroid-tools/db845c/db845c-deploy.sh4
-rwxr-xr-xandroid-tools/hikey/hikey-deploy.sh4
-rwxr-xr-xandroid-tools/hikey/hikey960-deploy.sh4
-rwxr-xr-xandroid-tools/x15/flash.sh4
4 files changed, 8 insertions, 8 deletions
diff --git a/android-tools/db845c/db845c-deploy.sh b/android-tools/db845c/db845c-deploy.sh
index bede38e..2a7e0fb 100755
--- a/android-tools/db845c/db845c-deploy.sh
+++ b/android-tools/db845c/db845c-deploy.sh
@@ -12,11 +12,11 @@ fi
num_fastboot_devices=$(fastboot devices|wc -l)
if [ ${num_fastboot_devices} -eq 0 ]; then
echo "No fastboot devices available, please check and try again"
- exit 1
+ export ANDROID_SERIAL="${local_android_serial}"
elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
# for local multiple devices support
export ANDROID_SERIAL="${local_android_serial}"
-elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
+elif [ ${num_fastboot_devices} -eq 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
device_serial=$(fastboot devices|awk '{print $1}')
export ANDROID_SERIAL="${device_serial}"
fi
diff --git a/android-tools/hikey/hikey-deploy.sh b/android-tools/hikey/hikey-deploy.sh
index bebecbc..ad2cddf 100755
--- a/android-tools/hikey/hikey-deploy.sh
+++ b/android-tools/hikey/hikey-deploy.sh
@@ -12,11 +12,11 @@ fi
num_fastboot_devices=$(fastboot devices|wc -l)
if [ ${num_fastboot_devices} -eq 0 ]; then
echo "No fastboot devices available, please check and try again"
- exit 1
+ export ANDROID_SERIAL="${local_android_serial}"
elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
# for local multiple devices support
export ANDROID_SERIAL="${local_android_serial}"
-elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
+elif [ ${num_fastboot_devices} -eq 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
device_serial=$(fastboot devices|awk '{print $1}')
export ANDROID_SERIAL="${device_serial}"
fi
diff --git a/android-tools/hikey/hikey960-deploy.sh b/android-tools/hikey/hikey960-deploy.sh
index 1f0d444..904d3b3 100755
--- a/android-tools/hikey/hikey960-deploy.sh
+++ b/android-tools/hikey/hikey960-deploy.sh
@@ -12,11 +12,11 @@ fi
num_fastboot_devices=$(fastboot devices|wc -l)
if [ ${num_fastboot_devices} -eq 0 ]; then
echo "No fastboot devices available, please check and try again"
- exit 1
+ export ANDROID_SERIAL="${local_android_serial}"
elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
# for local multiple devices support
export ANDROID_SERIAL="${local_android_serial}"
-elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
+elif [ ${num_fastboot_devices} -eq 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
device_serial=$(fastboot devices|awk '{print $1}')
export ANDROID_SERIAL="${device_serial}"
fi
diff --git a/android-tools/x15/flash.sh b/android-tools/x15/flash.sh
index df44c73..779126b 100755
--- a/android-tools/x15/flash.sh
+++ b/android-tools/x15/flash.sh
@@ -14,11 +14,11 @@ fi
num_fastboot_devices=$(fastboot devices|wc -l)
if [ ${num_fastboot_devices} -eq 0 ]; then
echo "No fastboot devices available, please check and try again"
- exit 1
+ export ANDROID_SERIAL="${local_android_serial}"
elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
# for local multiple devices support
export ANDROID_SERIAL="${local_android_serial}"
-elif [ ${num_fastboot_devices} -ne 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
+elif [ ${num_fastboot_devices} -eq 1 ] && [ -z "${ANDROID_SERIAL}" ]; then
device_serial=$(fastboot devices|awk '{print $1}')
export ANDROID_SERIAL="${device_serial}"
fi