mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
make.sh: Use exiterror to end script safely
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
13
make.sh
13
make.sh
@@ -862,16 +862,13 @@ fi
|
|||||||
HOST_MEM=$(system_memory)
|
HOST_MEM=$(system_memory)
|
||||||
|
|
||||||
# Checking host memory, tuning XZ_OPT
|
# Checking host memory, tuning XZ_OPT
|
||||||
if [ $HOST_MEM -lt 1024 ]; then
|
if [ ${HOST_MEM} -lt 1024 ]; then
|
||||||
print_build_stage "Host-Memory: $HOST_MEM MiB"
|
exiterror "You will need more than 1GB or host memory to run the build"
|
||||||
print_build_stage "Not enough host memory (less than 1024 MiB, please consider upgrading)"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
XZ_MEM="$(( HOST_MEM * 7 / 10 ))MiB"
|
|
||||||
XZ_OPT="-T4 -8 --memory=$XZ_MEM"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
XZ_MEM="$(( HOST_MEM * 7 / 10 ))MiB"
|
||||||
|
XZ_OPT="-T4 -8 --memory=$XZ_MEM"
|
||||||
|
|
||||||
if [ -n "${BUILD_ARCH}" ]; then
|
if [ -n "${BUILD_ARCH}" ]; then
|
||||||
configure_build "${BUILD_ARCH}"
|
configure_build "${BUILD_ARCH}"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user