summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-07-16 20:46:52 +0800
committerDmitry Shmidt <dimitrysh@google.com>2016-07-21 09:37:35 -0700
commitaa8a200ebbbf56f9200397b69814c60a0f4c3b21 (patch)
treea58ef62404280a5dee053dfb4f1b003ee29e68b5
parentb9e87065ffbb8aace467393e467cea95007d6908 (diff)
downloadhikey-aa8a200ebbbf56f9200397b69814c60a0f4c3b21.tar.gz
flash-all.sh: support for case that not run lunch
In the cases that we build in a script or built several days before, we don't want to run "lunch hikey-userdebug" before run flash-all.sh ANDROID_BUILD_TOP will be only availbe after run lunch command Change-Id: I06c9479cd05a5178b6d1444eedbc67d743db28ae Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-xinstaller/flash-all.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/installer/flash-all.sh b/installer/flash-all.sh
index 7cf47758..2c3365c7 100755
--- a/installer/flash-all.sh
+++ b/installer/flash-all.sh
@@ -23,6 +23,12 @@ fi
INSTALLER_DIR="`dirname ${0}`"
FIRMWARE_DIR="${INSTALLER_DIR}"
+# for cases that not run "lunch hikey-userdebu"
+if [ -z "${ANDROID_BUILD_TOP}" ]; then
+ ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../
+ ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/hikey"
+fi
+
if [ -z "${DIST_DIR}" ]; then
DIST_DIR="${ANDROID_BUILD_TOP}"/out/dist
fi