make.sh: Check free space in the base directory

This makes more sense if we want to support building multiple
architectures and if we consider cache and ccache, too.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2024-07-05 08:27:55 +00:00
parent 27b8db2421
commit b39d6d9a89

View File

@@ -387,7 +387,7 @@ prepareenv() {
local free_space free_blocks block_size
# Fetch free blocks
read -r free_blocks block_size <<< "$(stat --file-system --format="%a %S" "${BUILD_DIR}")"
read -r free_blocks block_size <<< "$(stat --file-system --format="%a %S" "${BASEDIR}")"
# Calculate free space
(( free_space = free_blocks * block_size / 1024 / 1024 ))