From 19c475e58d9305717bef880a09841a61d5f8593d Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 1 Apr 2023 12:28:53 +0200 Subject: [PATCH] Refactor calculation of swap size --- scripts/OS/Arch/partition.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/OS/Arch/partition.sh b/scripts/OS/Arch/partition.sh index f52fc497..3098c251 100755 --- a/scripts/OS/Arch/partition.sh +++ b/scripts/OS/Arch/partition.sh @@ -3,8 +3,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null; source "../../Scripts/choose-disk.sh"; chooseDisk archDisk "Which disk do you whish to format for installing Arch?"; memory="$(cat /proc/meminfo | awk -F " " '/^MemTotal/ { print $2 }')"; -memory="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024) + 0.5)}')"; -swapSize="$(echo "$memory" | awk '{ print int(($1 / 4) + 0.5)}')"; +swapSize="$(echo "$memory" | awk '{ print int(($1 / 1024 / 1024 4) + 0.5)}')"; { echo "g";