From a0147d503832cc230e2ea718c283f92a947d906b Mon Sep 17 00:00:00 2001 From: PiBa-NL Date: Sun, 19 Oct 2014 00:02:59 +0200 Subject: [PATCH] show fatal git errors to user. --- builder_scripts/builder_common.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/builder_scripts/builder_common.sh b/builder_scripts/builder_common.sh index a8bc6d9..49afbbc 100755 --- a/builder_scripts/builder_common.sh +++ b/builder_scripts/builder_common.sh @@ -1145,7 +1145,7 @@ update_pfSense_repository() { if [ ! -d "${GIT_REPO_DIR}/pfSenseGITREPO/.git" ]; then echo -n ">>> Cloning ${GIT_REPO_PFSENSE} ..." - (cd ${GIT_REPO_DIR} && /usr/local/bin/git clone ${GIT_REPO_PFSENSE} pfSenseGITREPO) 2>&1 | egrep -B3 -A3 -wi '(error)' + (cd ${GIT_REPO_DIR} && /usr/local/bin/git clone ${GIT_REPO_PFSENSE} pfSenseGITREPO) 2>&1 | egrep -B3 -A3 -wi -E '(error)|fatal' if [ -d "${GIT_REPO_DIR}/pfSenseGITREPO" ]; then if [ ! -d "${GIT_REPO_DIR}/pfSenseGITREPO/conf.default" ]; then echo @@ -1167,7 +1167,7 @@ update_pfSense_repository() { else # Fetch an update of the repository # Proper branch checkout will be done from checkout_pfSense_git - ( 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' + ( 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' fi checkout_pfSense_git if [ $? != 0 ]; then @@ -2996,21 +2996,21 @@ update_freebsd_sources_and_apply_patches() { CUR_BRANCH=$(cd ${SRCDIR} && git branch | grep '^\*' | cut -d' ' -f2) if [ "${CUR_BRANCH}" = "${_FREEBSD_BRANCH}" ]; then _CLONE=0 - ( cd ${SRCDIR} && git fetch origin; git reset --hard; git clean -fxd; git rebase origin/${_FREEBSD_BRANCH} ) 2>&1 | grep -C3 -i 'error' + ( cd ${SRCDIR} && git fetch origin; git reset --hard; git clean -fxd; git rebase origin/${_FREEBSD_BRANCH} ) 2>&1 | grep -C3 -i -E 'error|fatal' elif (cd ${SRCDIR} && git branch 2>&1 | grep -q "${_FREEBSD_BRANCH}"); then _CLONE=0 - ( 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' + ( 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' else rm -rf ${SRCDIR} fi fi if [ ${_CLONE} -eq 1 ]; then - ( git clone --branch ${_FREEBSD_BRANCH} --single-branch ${FREEBSD_REPO_BASE} ${SRCDIR} ) 2>&1 | grep -C3 -i 'error' + ( git clone --branch ${_FREEBSD_BRANCH} --single-branch ${FREEBSD_REPO_BASE} ${SRCDIR} ) 2>&1 | grep -C3 -i -E 'error|fatal' fi if [ -n "${GIT_FREEBSD_COSHA1}" ]; then - ( cd ${SRCDIR} && git checkout ${GIT_FREEBSD_COSHA1} ) 2>&1 | grep -C3 -i 'error' + ( cd ${SRCDIR} && git checkout ${GIT_FREEBSD_COSHA1} ) 2>&1 | grep -C3 -i -E 'error|fatal' fi fi echo "Done!" -- 1.8.3.msysgit.0