From f85ec8a22e65aa8054bcb98feb6f9b87113b7408 Mon Sep 17 00:00:00 2001 From: frk Date: Sun, 19 Feb 2017 15:57:25 +0100 Subject: [PATCH] build: Pass path into grep instead of using cat grep should be given the filename directly instead of using cat to pass the file contents. Change-Id: Ic5275ac0f057f3d134fe57f43672a73fa7e3d7de Signed-off-by: frk --- build/envsetup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/envsetup.sh b/build/envsetup.sh index f6948211..7825ba02 100644 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -683,7 +683,7 @@ function mka() { make -C $T -j `sysctl hw.ncpu|cut -d" " -f2` "$@" ;; *) - mk_timer schedtool -B -n 10 -e ionice -n 7 make -C $T -j$(cat /proc/cpuinfo | grep "^processor" | wc -l) "$@" + mk_timer schedtool -B -n 10 -e ionice -n 7 make -C $T -j$(grep "^processor" /proc/cpuinfo | wc -l) "$@" ;; esac @@ -727,7 +727,7 @@ function mms() { make -C $T -j $NUM_CPUS "$@" ;; *) - local NUM_CPUS=$(cat /proc/cpuinfo | grep "^processor" | wc -l) + local NUM_CPUS=$(grep "^processor" /proc/cpuinfo | wc -l) ONE_SHOT_MAKEFILE="__none__" \ mk_timer schedtool -B -n 1 -e ionice -n 1 \ make -C $T -j $NUM_CPUS "$@"