Store disk names in variables

This commit is contained in:
Manuel Thalmann 2023-04-01 03:19:02 +02:00
parent 37fcbd3557
commit 36fc589408

View file

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