From 54becce5dfc8f78c4b41bfe23392612685d3d037 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Thu, 29 Oct 2026 14:59:00 -0400 Subject: [PATCH] format-buddy.sh: accept any block device, including nvme and mmc Co-Authored-By: Claude Opus 5.5 --- format-buddy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/format-buddy.sh b/format-buddy.sh index eae36b8..5baf552 100755 --- a/format-buddy.sh +++ b/format-buddy.sh @@ -19,8 +19,8 @@ while true; do echo -n "Type full path to device (/dev/xx1): " read device - if [[ ! "${device}" =~ ^/dev/[a-z]+[0-9]*$ ]]; then - echo "Error: Invalid device path" + if [ ! -b "${device}" ]; then + echo "Error: ${device} is not a block device" read -n 1 -p "Press any key..." continue fi