From 6f4ae4be9d3bd3e9b7f08248a3d730dd1b44f354 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Mon, 17 Apr 2023 18:03:44 +0000 Subject: [PATCH] Test if statement --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index 0cc724e..a282230 100644 --- a/install.sh +++ b/install.sh @@ -35,6 +35,22 @@ echo 19 # Change last partition to Swap. echo w # write changes. ) | sudo fdisk $driveName -w always -W always +if [ $driveName == /dev/nvme* ]; then + # Format the NVMe drive with the ext4 filesystem + mkfs.ext4 $DEVICE_PATH + +# Check if the device is a SATA drive +elif [ $driveName == /dev/sd* ]; then + # Format the SATA drive with the NTFS filesystem + mkfs.ntfs $DEVICE_PATH + +# Check if the device is an eMMC drive +elif [ $driveName == /dev/mmcblk* ]; then + # Format the eMMC drive with the FAT32 filesystem + mkfs.fat -F 32 $DEVICE_PATH + +fi + # List the new partitions. lsblk -f