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): "
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user