From 5cc26f2c2b1acd1b02bdb9a78af02bc7beca49a9 Mon Sep 17 00:00:00 2001 From: sitolam Date: Wed, 1 Jan 2025 20:21:41 +0100 Subject: [PATCH] fix: not installing when free space is somewhere else --- setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup b/setup index 7c8fcbf..8e9760a 100755 --- a/setup +++ b/setup @@ -759,8 +759,8 @@ create_alongside_layout() { fi # Find the largest free space - largest_free_space=$(parted "$DISK" unit MiB print free | awk '/Free Space/' | tr -s ' ' | sort -t ' ' -k3,3n | sed 's/MiB//g' | tail -n1) - start=$(echo $largest_free_space | awk '{print $1}') + largest_free_space=$(parted "$DISK" unit MiB print free | awk '/Free Space/' | tr -s ' ' | sed 's/^ //' | sort -t ' ' -k3,3n | sed 's/MiB//g' | tail -n1) + start=$(echo $largest_free_space | awk '{print $1}' | awk '{print int($1+0.999)}') end=$(echo $largest_free_space | awk '{print $2}') # Calculate sizes