]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
make.sh: Rename HOST_MEM to SYSTEM_MEMORY
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 4 Mar 2019 11:35:15 +0000 (11:35 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 4 Mar 2019 11:35:15 +0000 (11:35 +0000)
We had two variables holding the same data

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index d821fed4acabfdddab56a3b5f904c732e16235fd..78fb2e41a3ba1d57212cedcc4c28743e53eae681 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -205,7 +205,7 @@ configure_build() {
                # We assume that each process consumes about
                # 192MB of memory. Therefore we find out how
                # many processes fit into memory.
-               local mem_max=$(( ${HOST_MEM} / 192 ))
+               local mem_max=$(( ${SYSTEM_MEMORY} / 192 ))
 
                local processors="$(system_processors)"
                local cpu_max=$(( ${processors} + 1 ))
@@ -237,7 +237,7 @@ configure_build() {
        # We need to limit memory because XZ uses too much when running
        # in parallel and it isn't very smart in limiting itself.
        # We allow XZ to use up to 70% of all system memory.
-       local xz_memory=$(( HOST_MEM * 7 / 10 ))
+       local xz_memory=$(( SYSTEM_MEMORY * 7 / 10 ))
 
        # XZ memory cannot be larger than 2GB on 32 bit systems
        case "${build_arch}" in
@@ -915,9 +915,6 @@ fi
 SYSTEM_PROCESSORS="$(system_processors)"
 SYSTEM_MEMORY="$(system_memory)"
 
-# Get the amount of memory in this build system
-HOST_MEM=$(system_memory)
-
 if [ -n "${BUILD_ARCH}" ]; then
        configure_build "${BUILD_ARCH}"
 else