aboutsummaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2020-08-29 15:50:27 +0000
committerGlen Barber <gjb@FreeBSD.org>2020-08-29 15:50:27 +0000
commit91edfc6ca507aaec2816b7fa9f26b0834a8aeb5a (patch)
tree640117a991a3c397ea8ed7f2b1292e4db6a9e890 /release
parent9fb61eb199944b0d49cdd32d0a8ec82e72a6f613 (diff)
downloadsrc-91edfc6ca507aaec2816b7fa9f26b0834a8aeb5a.tar.gz
src-91edfc6ca507aaec2816b7fa9f26b0834a8aeb5a.zip
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)
Notes
Notes: svn path=/head/; revision=364959
Diffstat (limited to 'release')
-rwxr-xr-xrelease/release.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/release/release.sh b/release/release.sh
index ab295b95c2ec..8d38368b61ab 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -70,6 +70,7 @@ env_setup() {
exit 1
fi
VCSCMD="/usr/local/bin/git clone -q"
+ VCSUPDATE="/usr/local/bin/git pull -q"
# The default git checkout server, and branches for src/, doc/,
# and ports/.
@@ -220,13 +221,25 @@ chroot_setup() {
mkdir -p ${CHROOTDIR}/usr
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
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
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
if [ -z "${CHROOTBUILD_SKIP}" ]; then