From 6cfa56dcecbf97b06505e87373ab74bf02fcd24a Mon Sep 17 00:00:00 2001 From: Sinipelto Date: Mon, 20 Nov 2023 14:11:29 +0200 Subject: [PATCH] BuildSystem: image create sh use banan build dir Signed-off-by: Sinipelto --- script/image-create.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/script/image-create.sh b/script/image-create.sh index e617d9041b..e3b002eae6 100755 --- a/script/image-create.sh +++ b/script/image-create.sh @@ -25,8 +25,18 @@ if [[ -z $BANAN_ARCH ]]; then exit 1 fi +if [[ -z $BANAN_UEFI_BOOT ]]; then + echo "You must set the BANAN_UEFI_BOOT environment variable" >&2 + exit 1 +fi + +if [[ -z $BANAN_BUILD_DIR ]]; then + echo "You must set the BANAN_BUILD_DIR environment variable" >&2 + exit 1 +fi + DISK_SIZE=$[50 * 1024 * 1024] -MOUNT_DIR="${MOUNT_DIR:-/bananmnt}" +MOUNT_DIR="${MOUNT_DIR:-$BANAN_BUILD_DIR/bananmnt}" truncate -s 0 "$BANAN_DISK_IMAGE_PATH" truncate -s $DISK_SIZE "$BANAN_DISK_IMAGE_PATH"