format-buddy.sh: accept any block device, including nvme and mmc

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 14:59:00 -04:00
co-authored by Claude Opus 5.5
parent 7fafe84620
commit 54becce5df
+2 -2
View File
@@ -19,8 +19,8 @@ while true; do
echo -n "Type full path to device (/dev/xx1): " echo -n "Type full path to device (/dev/xx1): "
read device read device
if [[ ! "${device}" =~ ^/dev/[a-z]+[0-9]*$ ]]; then if [ ! -b "${device}" ]; then
echo "Error: Invalid device path" echo "Error: ${device} is not a block device"
read -n 1 -p "Press any key..." read -n 1 -p "Press any key..."
continue continue
fi fi