BuildSystem: custom mount directory for bananos image to avoid conflicts #4

Merged
Bananymous merged 6 commits from Sinipelto/banan-os:main into main 2023-11-20 14:16:58 +02:00
1 changed files with 11 additions and 1 deletions
Showing only changes of commit 6cfa56dcec - Show all commits

View File

@ -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"