Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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... "
Expand Down
17 changes: 17 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -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