Store disk names in variables

This commit is contained in:
Manuel Thalmann 2023-04-01 03:19:02 +02:00
parent c91df63afc
commit 933da5ef6c

View file

@ -38,9 +38,12 @@ swapSize="$(echo "$memory" | awk '{ print int(($1 / 4) + 0.5)}')";
echo "w";
} | fdisk "$archDisk";
disks=($(bash -c "echo $archDisk*"))
mount "${disks[2]}" /mnt;
mount --mkdir "${disks[0]}" /mnt/boot;
swapon "${disks[1]}";
disks=($(bash -c "echo $archDisk*"));
bootDisk="${disks[0]}";
swapDisk="${disks[1]}";
linuxDisk="${disks[2]}";
mount "$linuxDisk" /mnt;
mount --mkdir "$bootDisk" /mnt/boot;
swapon "$swapDisk";
popd > /dev/null;