diff --git a/build.sh b/build.sh index aa1aad2..4a718d1 100755 --- a/build.sh +++ b/build.sh @@ -77,8 +77,9 @@ create_image() { echo -e "${GREEN}OK${NC}" echo -n "Creating partition table and partition... " - parted -s "$IMG_NAME" mklabel msdos - parted -s "$IMG_NAME" mkpart primary fat32 1MiB 100% + parted -s "$IMG_NAME" mklabel msdos + parted -s "$IMG_NAME" mkpart primary 1MiB 100% + echo "type=1" | sfdisk --part-type "$IMG_NAME" 1 echo -e "${GREEN}OK${NC}" echo -n "Setting up loop device with partitions... " diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..498126b --- /dev/null +++ b/clean.sh @@ -0,0 +1,17 @@ +BUILD_DIR="build" +MOUNT_POINT="img" +IMG_NAME="opendos.img" + +RED='\033[31m' +GREEN='\033[32m' +BLUE='\033[34m' +PURPLE='\033[35m' +NC='\033[0m' + +clean() { + echo -e "${BLUE}=== Cleaning ===${NC}" + sudo umount "$MOUNT_POINT" 2>/dev/null || true + rm -rf "$BUILD_DIR" "$MOUNT_POINT" "$IMG_NAME" +} + +clean