Project

General

Profile

Bug #3944 » 0001-show-fatal-git-errors-to-user.patch

Pi Ba, 10/19/2014 08:25 AM

View differences:

builder_scripts/builder_common.sh
1145 1145

  
1146 1146
	if [ ! -d "${GIT_REPO_DIR}/pfSenseGITREPO/.git" ]; then
1147 1147
		echo -n ">>> Cloning ${GIT_REPO_PFSENSE} ..."
1148
		(cd ${GIT_REPO_DIR} && /usr/local/bin/git clone ${GIT_REPO_PFSENSE} pfSenseGITREPO) 2>&1 | egrep -B3 -A3 -wi '(error)'
1148
		(cd ${GIT_REPO_DIR} && /usr/local/bin/git clone ${GIT_REPO_PFSENSE} pfSenseGITREPO) 2>&1 | egrep -B3 -A3 -wi -E '(error)|fatal'
1149 1149
		if [ -d "${GIT_REPO_DIR}/pfSenseGITREPO" ]; then
1150 1150
			if [ ! -d "${GIT_REPO_DIR}/pfSenseGITREPO/conf.default" ]; then
1151 1151
				echo
......
1167 1167
	else
1168 1168
		# Fetch an update of the repository
1169 1169
		# Proper branch checkout will be done from checkout_pfSense_git
1170
		( cd ${GIT_REPO_DIR}/pfSenseGITREPO && git checkout master; git fetch origin; git reset --hard; git clean -fxd; git rebase origin ) 2>&1 | grep -C3 -i 'error'
1170
		( cd ${GIT_REPO_DIR}/pfSenseGITREPO && git checkout master; git fetch origin; git reset --hard; git clean -fxd; git rebase origin ) 2>&1 | grep -C3 -i -E 'error|fatal'
1171 1171
	fi
1172 1172
	checkout_pfSense_git
1173 1173
	if [ $? != 0 ]; then
......
2996 2996
			CUR_BRANCH=$(cd ${SRCDIR} && git branch | grep '^\*' | cut -d' ' -f2)
2997 2997
			if [ "${CUR_BRANCH}" = "${_FREEBSD_BRANCH}" ]; then
2998 2998
				_CLONE=0
2999
				( cd ${SRCDIR} && git fetch origin; git reset --hard; git clean -fxd; git rebase origin/${_FREEBSD_BRANCH} ) 2>&1 | grep -C3 -i 'error'
2999
				( cd ${SRCDIR} && git fetch origin; git reset --hard; git clean -fxd; git rebase origin/${_FREEBSD_BRANCH} ) 2>&1 | grep -C3 -i -E 'error|fatal'
3000 3000
			elif (cd ${SRCDIR} && git branch 2>&1 | grep -q "${_FREEBSD_BRANCH}"); then
3001 3001
				_CLONE=0
3002
				( cd ${SRCDIR} && git fetch origin; git reset --hard; git clean -fxd; git checkout ${_FREEBSD_BRANCH}; git rebase origin/${_FREEBSD_BRANCH} ) 2>&1 | grep -C3 -i 'error'
3002
				( cd ${SRCDIR} && git fetch origin; git reset --hard; git clean -fxd; git checkout ${_FREEBSD_BRANCH}; git rebase origin/${_FREEBSD_BRANCH} ) 2>&1 | grep -C3 -i -E 'error|fatal'
3003 3003
			else
3004 3004
				rm -rf ${SRCDIR}
3005 3005
			fi
3006 3006
		fi
3007 3007

  
3008 3008
		if [ ${_CLONE} -eq 1 ]; then
3009
			( git clone --branch ${_FREEBSD_BRANCH} --single-branch ${FREEBSD_REPO_BASE} ${SRCDIR} ) 2>&1 | grep -C3 -i 'error'
3009
			( git clone --branch ${_FREEBSD_BRANCH} --single-branch ${FREEBSD_REPO_BASE} ${SRCDIR} ) 2>&1 | grep -C3 -i -E 'error|fatal'
3010 3010
		fi
3011 3011

  
3012 3012
		if [ -n "${GIT_FREEBSD_COSHA1}" ]; then 
3013
			( cd ${SRCDIR} && git checkout ${GIT_FREEBSD_COSHA1} ) 2>&1 | grep -C3 -i 'error'
3013
			( cd ${SRCDIR} && git checkout ${GIT_FREEBSD_COSHA1} ) 2>&1 | grep -C3 -i -E 'error|fatal'
3014 3014
		fi
3015 3015
	fi
3016 3016
	echo "Done!"
(2-2/2)