Add a VCSUPDATE command to run 'git pull' instead of 'git clone'
if the tree already exists. Reported by: Michael Butler Sponsored by: Rubicon Communications, LLC (netgate.com)
This commit is contained in:
parent
9fb61eb199
commit
91edfc6ca5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364959
@ -70,6 +70,7 @@ env_setup() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
VCSCMD="/usr/local/bin/git clone -q"
|
VCSCMD="/usr/local/bin/git clone -q"
|
||||||
|
VCSUPDATE="/usr/local/bin/git pull -q"
|
||||||
|
|
||||||
# The default git checkout server, and branches for src/, doc/,
|
# The default git checkout server, and branches for src/, doc/,
|
||||||
# and ports/.
|
# and ports/.
|
||||||
@ -220,13 +221,25 @@ chroot_setup() {
|
|||||||
mkdir -p ${CHROOTDIR}/usr
|
mkdir -p ${CHROOTDIR}/usr
|
||||||
|
|
||||||
if [ -z "${SRC_UPDATE_SKIP}" ]; then
|
if [ -z "${SRC_UPDATE_SKIP}" ]; then
|
||||||
${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src
|
if [ -d "${CHROOTDIR}/usr/src" ]; then
|
||||||
|
cd ${CHROOTDIR}/usr/src && ${VCSUPDATE} && cd -
|
||||||
|
else
|
||||||
|
${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then
|
if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then
|
||||||
${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc
|
if [ -d "${CHROOTDIR}/usr/doc" ]; then
|
||||||
|
cd ${CHROOTDIR}/usr/doc && ${VCSUPDATE} && cd -
|
||||||
|
else
|
||||||
|
${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then
|
if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then
|
||||||
${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports
|
if [ -d "${CHROOTDIR}/usr/ports" ]; then
|
||||||
|
cd ${CHROOTDIR}/usr/ports && ${VCSUPDATE} && cd -
|
||||||
|
else
|
||||||
|
${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${CHROOTBUILD_SKIP}" ]; then
|
if [ -z "${CHROOTBUILD_SKIP}" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user