mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
Test if statement
This commit is contained in:
parent
8060b0f4f2
commit
6f4ae4be9d
1 changed files with 16 additions and 0 deletions
16
install.sh
16
install.sh
|
@ -35,6 +35,22 @@ echo 19 # Change last partition to Swap.
|
||||||
echo w # write changes.
|
echo w # write changes.
|
||||||
) | sudo fdisk $driveName -w always -W always
|
) | 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.
|
# List the new partitions.
|
||||||
lsblk -f
|
lsblk -f
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue