Skip to contentSkip to conversation

oe-layertool-setup.sh: don't depend on bc for math, use expr instead

PATCH New Denys Dmytriyenko 1 participant 1 message May 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oe-layertool-setup.sh: don't depend on bc for math, use expr instead

From: Denys Dmytriyenko <[email protected]>

---
 oe-layertool-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
oe-layertool-setup.sh +1 -1
index d3b36ee..ed65ca1 100755
@@ -730,7 +730,7 @@ EOM
 
     # set the number of threads
     threads=`cat /proc/cpuinfo | grep -c processor`
-    tnum=`echo "(${threads}*.75+.5)/1" | bc`
+    tnum=`expr \( ${threads} + 1 \) \* 75 / 100`
     sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE = \"-j ${tnum}\"/" $confdir/local.conf
     sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS = \"${tnum}\"/" $confdir/local.conf
 
Signature · 1 line
2.7.4