From af09e9a7ec2387c85db8c18aeda0f12f28fee239 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 7 Aug 2023 20:33:51 +0200 Subject: [PATCH] Refactor calculation of swap size --- scripts/Arch/OS/partition.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Arch/OS/partition.sh b/scripts/Arch/OS/partition.sh index fe0cf202..6503dc1c 100755 --- a/scripts/Arch/OS/partition.sh +++ b/scripts/Arch/OS/partition.sh @@ -7,7 +7,7 @@ ARCH_DISK="${ARCH_DISK}"; SKIP_FORMAT_EFI="${SKIP_FORMAT_EFI}"; PARTITION_SCRIPT="${PARTITION_SCRIPT:-"./default-partition.sh"}"; memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')"; -swapSize="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024 4) + 0.5)}')"; +swapSize="$(echo "$memory" | awk '{ print int((($1 / 1024 / 1024) * 0.75) + 0.5)}')"; export SWAP_SIZE="$swapSize";