Skip to content

Commit

Permalink
Fix makefile flags on low memory devices (#124)
Browse files Browse the repository at this point in the history
* Fix `makefile` flags on low memory devices

On devices with less than 512MB existing devices will use `-j2` due to wrong condition.
  • Loading branch information
ayufan committed Jun 2, 2023
1 parent 09f4cb1 commit 1b89974
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,12 @@ build_apps() {
## Determine Ramsize and export MAKEFLAG
if [[ "$(get_avail_mem)" -le 524288 ]]; then
USE_PROCS=-j1
fi
if [[ "$(get_avail_mem)" -le 1048576 ]]; then
elif [[ "$(get_avail_mem)" -le 1048576 ]]; then
USE_PROCS=-j2
fi
if [[ "$(get_avail_mem)" -gt 1048576 ]]; then
else
USE_PROCS=-j4
fi

for path in "${ALL_PATHS[@]}"; do
if [[ ! -d "${path}" ]]; then
printf "'%s' does not exist! Build skipped ... [WARN]\n" "${path}"
Expand Down

0 comments on commit 1b89974

Please sign in to comment.