Skip to content

Commit b59af40

Browse files
author
François Baldassari
committed
Fix precommit scripts on OSX
JerryScript-DCO-1.0-Signed-off-by: François Baldassari [email protected]
1 parent e1f20ad commit b59af40

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/check-cppcheck.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
CPPCHECK_JOBS=${CPPCHECK_JOBS:=$(nproc)}
18+
if [[ "$OSTYPE" == "linux"* ]]; then
19+
CPPCHECK_JOBS=${CPPCHECK_JOBS:=$(nproc)}
20+
elif [[ "$OSTYPE" == "darwin"* ]]; then
21+
CPPCHECK_JOBS=${CPPCHECK_JOBS:=$(sysctl -n hw.ncpu)}
22+
else
23+
CPPCHECK_JOBS=${CPPCHECK_JOBS:=1}
24+
fi
1925

2026
JERRY_CORE_DIRS=`find jerry-core -type d`
2127
JERRY_LIBC_DIRS=`find jerry-libc -type d`

0 commit comments

Comments
 (0)