diff --git a/scripts/OS/Arch/partition.sh b/scripts/OS/Arch/partition.sh index c12b9017..7d7a9091 100755 --- a/scripts/OS/Arch/partition.sh +++ b/scripts/OS/Arch/partition.sh @@ -1,7 +1,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null; +ARCH_DISK="${ARCH_DISK:-$(chooseDisk "Which disk do you wish to format for installing Arch?")}"; source "../../Scripts/choose-disk.sh"; -archDisk="$(chooseDisk "Which disk do you whish to format for installing Arch?")"; memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')"; swapSize="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024 4) + 0.5)}')"; @@ -35,9 +35,9 @@ swapSize="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024 4) + 0.5)}')"; echo "23"; echo "w"; -} | fdisk "$archDisk"; +} | fdisk "$ARCH_DISK"; -disks=($(bash -c "echo $archDisk*")); +disks=($(bash -c "echo $ARCH_DISK*")); bootDisk="${disks[1]}"; swapDisk="${disks[2]}"; linuxDisk="${disks[3]}";