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 <frk@haze-productions.com>
diff --git a/build/envsetup.sh b/build/envsetup.sh
index f694821..7825ba0 100644
--- a/build/envsetup.sh
+++ b/build/envsetup.sh
@@ -683,7 +683,7 @@
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 @@
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 "$@"