Use nproc instead of ncpu
authorCiro Santilli <ciro.santilli@gmail.com>
Tue, 7 Mar 2017 08:00:31 +0000 (08:00 +0000)
committerTobin Ehlis <tobine@google.com>
Wed, 8 Mar 2017 01:06:26 +0000 (17:06 -0800)
The command is more widely available in Linux since it is part of Coreutils.

build-android/update_external_sources_android.sh

index 183ed13..f3f8321 100755 (executable)
@@ -32,7 +32,7 @@ echo "SPIRV_TOOLS_REVISION=$SPIRV_TOOLS_REVISION"
 echo "SHADERC_REVISION=$SHADERC_REVISION"
 
 if [[ $(uname) == "Linux" ]]; then
-    cores=$(ncpus || echo 4)
+    cores="$(nproc || echo 4)"
 elif [[ $(uname) == "Darwin" ]]; then
     cores=$(sysctl -n hw.ncpu)
 fi