#
#
-# Return true if the working tree is after the commit that made
+# Return true if the working tree is after the release that made
# make -j8 check possible
#
function can_parallel_make_check() {
- local commit=$(git rev-parse tags/v0.88^{})
- git rev-list HEAD | grep --quiet $commit
+ test "$(git rev-list --max-count=1 --ancestry-path HEAD ^tags/v0.88)"
}
function maybe_parallel_make_check() {
if test -n "$NPROC" ; then
echo $NPROC
else
- local processors=$(grep -c '^processor' /proc/cpuinfo)
- if test $processors -ge 2 ; then
- expr $processors / 2
+ if test $(nproc) -ge 2 ; then
+ expr $(nproc) / 2
else
echo 1
fi