diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2016-07-16 20:46:52 +0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-07-21 09:37:35 -0700 |
commit | aa8a200ebbbf56f9200397b69814c60a0f4c3b21 (patch) | |
tree | a58ef62404280a5dee053dfb4f1b003ee29e68b5 | |
parent | b9e87065ffbb8aace467393e467cea95007d6908 (diff) | |
download | hikey-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-x | installer/flash-all.sh | 6 |
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 |