diff --git a/buildscript b/buildscript index 9b194e7e..af929d71 100755 --- a/buildscript +++ b/buildscript @@ -208,13 +208,19 @@ build() { case "$1" in "debug") - make V=99 + if [ -n "$2" ]; then + make V=99 -j $2 + else + make V=99 + fi ;; "fast") - ionice -c 2 -- nice -n 1 -- make -j $((cpus*2)) + [ -n "$2" ] && threads=$2 || threads=$((cpus*2)) + ionice -c 2 -- nice -n 1 -- make -j $threads ;; *) - ionice -c 3 -- nice -n 10 -- make -j $((cpus+1)) + [ -n "$2" ] && threads=$2 || threads=$((cpus+1)) + ionice -c 3 -- nice -n 10 -- make -j $threads ;; esac @@ -444,13 +450,13 @@ case "$1" in "build") if [ "$2" = "help" ] || [ "$2" = "x" ]; then echo "This option compiles the firmware" - echo "Normaly the build uses lower IO and System priorities, " + echo "Normally the build uses lower IO and System priorities, " echo "you can append \"fast\" option, to use normal user priorities" echo - echo "Usage: $0 $1 [fast|debug]" + echo "Usage: $0 $1 [fast|debug] [numthreads]" echo else - build "$2" + build "$2" "$3" fi ;; "config")