Use expr instead of POSIX sh numerical expression to avoid

a syntax error on older shells.
This commit is contained in:
Todd C. Miller
2016-11-09 06:03:31 -07:00
parent 541ffbeec8
commit dbf07431d0

2
mkpkg
View File

@@ -103,7 +103,7 @@ if make --version 2>&1 | grep GNU >/dev/null; then
Linux)
if [ -r /proc/cpuinfo ]; then
for c in `sed -n 's/^cpu cores[ ]*: *//p' /proc/cpuinfo`; do
NJOBS=$(( $NJOBS + $c ))
NJOBS=`expr $NJOBS + $c`
done
fi
;;