forked from Bananymous/banan-os
BuildSystem: Add cmake target to validate main partition
This commit is contained in:
parent
65501837b7
commit
104b2740bc
|
@ -78,6 +78,11 @@ add_custom_target(image-full
|
|||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(check-fs
|
||||
COMMAND ${CMAKE_COMMAND} -E env DISK_IMAGE_PATH="${DISK_IMAGE_PATH}" ${CMAKE_SOURCE_DIR}/check-fs.sh
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
add_custom_target(qemu
|
||||
COMMAND ${CMAKE_COMMAND} -E env BANAN_ARCH="${BANAN_ARCH}" DISK_IMAGE_PATH="${DISK_IMAGE_PATH}" ${CMAKE_SOURCE_DIR}/qemu.sh
|
||||
DEPENDS image
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
LOOP_DEV=$(sudo losetup -f --show $DISK_IMAGE_PATH)
|
||||
sudo partprobe $LOOP_DEV
|
||||
|
||||
sudo fsck.ext2 -fn ${LOOP_DEV}p2 || true
|
||||
|
||||
sudo losetup -d $LOOP_DEV
|
Loading…
Reference in New Issue