Bug #3944 » 0001-show-fatal-git-errors-to-user.patch
| builder_scripts/builder_common.sh | ||
|---|---|---|
|
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
|
||
| ... | ... | |
|
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
|
||
| ... | ... | |
|
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!"
|
||
- « Previous
- 1
- 2
- Next »