Commit c323fcbb authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Fix parallel git jobs for Git >= 2.8

parent cbbbbe97
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -67,13 +67,13 @@ git_check()
{
	local v
	GIT_VERSION=0
	for v in `git --version|cut -f -d\ |tr '.' ' '`; do
	for v in `git --version|cut -f3 -d\ |tr '.' ' '`; do
		let 'GIT_VERSION = (GIT_VERSION << 8) + (v & 0xff)'
	done

	if [ $GIT_VERSION -gt 0x020800 ]; then
	if [ $GIT_VERSION -gt $((0x020800)) ]; then
		local numcpu=`lscpu -p|grep '^[^#]'|wc -l`
		GIT_JOBS="--jobs $(((numcpu>1)?(numcpu-1):(numcpu)))"
		GIT_JOBS="--jobs=$(((numcpu>1)?(numcpu-1):(numcpu)))"
	else
		GIT_JOBS=
	fi