fi
debug-print "${FUNCNAME}: working in \"${1}\""
- pushd "${EGIT_DIR}" > /dev/null
+ pushd "${EGIT_DIR}" > /dev/null || die
debug-print "${FUNCNAME}: git submodule init"
git submodule init || die
debug-print "${FUNCNAME}: git submodule update"
git submodule update || die
- popd > /dev/null
+ popd > /dev/null || die
fi
}
local branchname src
debug-print "${FUNCNAME}: working in \"${EGIT_SOURCEDIR}\""
- pushd "${EGIT_SOURCEDIR}" > /dev/null
+ pushd "${EGIT_SOURCEDIR}" > /dev/null || die
local branchname=branch-${EGIT_BRANCH} src=origin/${EGIT_BRANCH}
if [[ ${EGIT_COMMIT} != ${EGIT_BRANCH} ]]; then
git checkout -b ${branchname} ${src} \
|| die "${FUNCNAME}: changing the branch failed"
- popd > /dev/null
+ popd > /dev/null || die
}
# @FUNCTION: git-2_gc
local args
if [[ ${EGIT_REPACK} || ${EGIT_PRUNE} ]]; then
- pushd "${EGIT_DIR}" > /dev/null
+ pushd "${EGIT_DIR}" > /dev/null || die
ebegin "Garbage collecting the repository"
[[ ${EGIT_PRUNE} ]] && args='--prune'
debug-print "${FUNCNAME}: git gc ${args}"
git gc ${args}
eend $?
- popd > /dev/null
+ popd > /dev/null || die
fi
}
debug-print-function ${FUNCNAME} "$@"
debug-print "${FUNCNAME}: ${MOVE_COMMAND} \"${EGIT_DIR}\" \"${EGIT_SOURCEDIR}\""
- pushd "${EGIT_DIR}" > /dev/null
+ pushd "${EGIT_DIR}" > /dev/null || die
mkdir -p "${EGIT_SOURCEDIR}" \
|| die "${FUNCNAME}: failed to create ${EGIT_SOURCEDIR}"
${MOVE_COMMAND} "${EGIT_SOURCEDIR}" \
|| die "${FUNCNAME}: sync to \"${EGIT_SOURCEDIR}\" failed"
- popd > /dev/null
+ popd > /dev/null || die
}
# @FUNCTION: git-2_initial_clone
if [[ ! -d ${EGIT_DIR} ]]; then
git-2_initial_clone
- pushd "${EGIT_DIR}" > /dev/null
+ pushd "${EGIT_DIR}" > /dev/null || die
cursha=$(git rev-parse ${UPSTREAM_BRANCH})
echo "GIT NEW clone -->"
echo " repository: ${EGIT_REPO_URI_SELECTED}"
echo " at the commit: ${cursha}"
- popd > /dev/null
+ popd > /dev/null || die
elif [[ ${EVCS_OFFLINE} ]]; then
- pushd "${EGIT_DIR}" > /dev/null
+ pushd "${EGIT_DIR}" > /dev/null || die
cursha=$(git rev-parse ${UPSTREAM_BRANCH})
echo "GIT offline update -->"
echo " repository: $(git config remote.origin.url)"
echo " at the commit: ${cursha}"
- popd > /dev/null
+ popd > /dev/null || die
else
- pushd "${EGIT_DIR}" > /dev/null
+ pushd "${EGIT_DIR}" > /dev/null || die
oldsha=$(git rev-parse ${UPSTREAM_BRANCH})
git-2_update_repo
cursha=$(git rev-parse ${UPSTREAM_BRANCH})
# print nice statistic of what was changed
git --no-pager diff --stat ${oldsha}..${UPSTREAM_BRANCH}
- popd > /dev/null
+ popd > /dev/null || die
fi
# export the version the repository is at
export EGIT_VERSION="${cursha}"
# combination with --keep-going it would lead in not-updating
# pakcages that are up-to-date.
if [[ ${EGIT_BOOTSTRAP} ]]; then
- pushd "${EGIT_SOURCEDIR}" > /dev/null
+ pushd "${EGIT_SOURCEDIR}" > /dev/null || die
einfo "Starting bootstrap"
if [[ -f ${EGIT_BOOTSTRAP} ]]; then
fi
einfo "Bootstrap finished"
- popd > /dev/null
+ popd > /dev/null || die
fi
}