From 0ee5dab45772fdfa942f6fc85d3722175d098b56 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Mon, 20 Nov 2023 22:19:51 +0530 Subject: [PATCH] less verbose image creation --- create-image.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/create-image.sh b/create-image.sh index 12e27df..f4d5a48 100755 --- a/create-image.sh +++ b/create-image.sh @@ -33,7 +33,7 @@ function create_new_image { UBOOT_MAX_SIZE='64' IMAGE_SIZE=$(( $(stat -c '%s' "${IMAGE_NAME}") / 1024 / 1024 )) NEW_IMAGE_NAME="${IMAGE_NAME}.new" - truncate -s "$(( IMAGE_SIZE + (UBOOT_MAX_SIZE * 2) ))"MiB "${NEW_IMAGE_NAME}" + truncate -s "$(( IMAGE_SIZE + UBOOT_MAX_SIZE ))"MiB "${NEW_IMAGE_NAME}" LOOPBACK_01=$(losetup -f -P --show "${IMAGE_NAME}") LOOPBACK_02=$(losetup -f -P --show "${NEW_IMAGE_NAME}") @@ -69,8 +69,6 @@ EOF losetup -d "${LOOPBACK_02}" losetup -d "${LOOPBACK_01}" - fdisk -l "${IMAGE_NAME}" - fdisk -l "${NEW_IMAGE_NAME}" mv "${NEW_IMAGE_NAME}" "${IMAGE_NAME}" sync; sync; sync; sync; sleep 10