summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2017-04-23 23:24:32 (GMT)
committerRobert Foss <robert.foss@collabora.com>2017-04-23 23:24:32 (GMT)
commitd3d84a62c127aef1cde45b205696fc8283fd7d14 (patch)
tree0b0400410691c04a5837783ba6397fbd309c2097
parent4cc854379d112e72d5250a6be749d5dd26f91508 (diff)
downloadrdu2-d3d84a62c127aef1cde45b205696fc8283fd7d14.tar.gz
rdu2-d3d84a62c127aef1cde45b205696fc8283fd7d14.tar.xz
Fix broken if statement
-rwxr-xr-xbuild_android.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/build_android.sh b/build_android.sh
index ae48e40..2f288f8 100755
--- a/build_android.sh
+++ b/build_android.sh
@@ -32,6 +32,10 @@ flash_uboot()
TMPDIR=$(mktemp -d)
ME=$(whoami)
+ if ! [[ -a $DEV ]]; then
+ return 0
+ fi
+
DEV_PARTITION=$(lsblk -prb -o NAME,SIZE,LABEL $BLK_DEV | grep "boot" | cut -d' ' -f1)
if [ -z "$DEV_PARTITION" ]; then
help_mmc
@@ -92,7 +96,6 @@ flash_kernel()
# Do things on new kernel build
if [ -a /dev/mmcblk0 ]; then
flash_kernel_mmc
- flash_uboot
fi
fi
@@ -144,8 +147,8 @@ flash_android_mmc()
flash_android()
{
-
TIMESTAMP="${PROJECT_PATH}/flash_android.timestamp"
+
if [ ! -f "${TIMESTAMP}" ] || \
[ ${ANDROID_IMAGE_PATH}/cache.img -nt ${TIMESTAMP} ] || \
[ ${ANDROID_IMAGE_PATH}/ramdisk.img -nt ${TIMESTAMP} ] || \
@@ -175,4 +178,5 @@ build_android()
cd $PROJECT_PATH && \
build_kernel && \
build_android $1 && \
+flash_uboot && \
exit 0