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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user