]> granicus.if.org Git - sudo/commitdiff
Use expr instead of POSIX sh numerical expression to avoid
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 9 Nov 2016 13:03:31 +0000 (06:03 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 9 Nov 2016 13:03:31 +0000 (06:03 -0700)
a syntax error on older shells.

mkpkg

diff --git a/mkpkg b/mkpkg
index 9f4271d73efdfeb25f93ae84932a59ed2a9884c7..f889a0883d538569facc3f361f4319bf5822a323 100755 (executable)
--- a/mkpkg
+++ b/mkpkg
@@ -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
            ;;