Make blank after -j flag optional

This commit is contained in:
Matthias Krack 2022-01-11 11:59:01 +01:00
parent de2e98d62d
commit e076040b12
2 changed files with 4 additions and 1 deletions

View file

@ -372,6 +372,9 @@ while [ $# -ge 1 ]; do
shift
export NPROCS_OVERWRITE=$1
;;
-j[0-9]*)
export NPROCS_OVERWRITE=${1#-j}
;;
--no-check-certificate)
export DOWNLOADER_FLAGS="-n"
;;

View file

@ -144,7 +144,7 @@ reverse() (
# get the number of processes available for compilation
get_nprocs() {
if [ -n "${NPROCS_OVERWRITE}" ]; then
echo "${NPROCS_OVERWRITE}"
echo ${NPROCS_OVERWRITE} | sed 's/^0*//'
elif $(command -v nproc >&- 2>&-); then
echo $(nproc --all)
else