mkimg: minor cleanups
This commit is contained in:
8
mkimg.sh
8
mkimg.sh
@@ -11,17 +11,19 @@ exit_with_error() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "${TARGET_PRODUCT}" ]; then
|
if [ -z ${TARGET_PRODUCT} ]; then
|
||||||
exit_with_error "TARGET_PRODUCT environment variable is not set. Run lunch first."
|
exit_with_error "TARGET_PRODUCT environment variable is not set. Run lunch first."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ANDROID_PRODUCT_OUT}" ]; then
|
if [ -z ${ANDROID_PRODUCT_OUT} ]; then
|
||||||
exit_with_error "ANDROID_PRODUCT_OUT environment variable is not set. Run lunch first."
|
exit_with_error "ANDROID_PRODUCT_OUT environment variable is not set. Run lunch first."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f ${ANDROID_PRODUCT_OUT}/boot.img ] || [ ! -f ${ANDROID_PRODUCT_OUT}/system.img ] || [ ! -f ${ANDROID_PRODUCT_OUT}/vendor.img ]; then
|
for PARTITION in "boot" "system" "vendor"; do
|
||||||
|
if [ ! -f ${ANDROID_PRODUCT_OUT}/${PARTITION}.img ]; then
|
||||||
exit_with_error "Partition image not found. Run make first."
|
exit_with_error "Partition image not found. Run make first."
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
VERSION=RaspberryVanillaAOSP15
|
VERSION=RaspberryVanillaAOSP15
|
||||||
DATE=$(date +%Y%m%d)
|
DATE=$(date +%Y%m%d)
|
||||||
|
Reference in New Issue
Block a user