aboutsummaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2020-08-29 16:04:02 +0000
committerGlen Barber <gjb@FreeBSD.org>2020-08-29 16:04:02 +0000
commit8ea469ebbb7eab772f2968179f29c12b1cd734e1 (patch)
tree788f6fe16261721c7014b0ea72578fed775f7ed2 /release
parent91edfc6ca507aaec2816b7fa9f26b0834a8aeb5a (diff)
downloadsrc-8ea469ebbb7eab772f2968179f29c12b1cd734e1.tar.gz
src-8ea469ebbb7eab772f2968179f29c12b1cd734e1.zip
Refine the VCSUPDATE logic further:
- Look for the .git directory instead of top-level directory. - Use 'git -C' instead of cd(1). Sponsored by: Rubicon Communications, LLC (netgate.com)
Notes
Notes: svn path=/head/; revision=364960
Diffstat (limited to 'release')
-rwxr-xr-xrelease/release.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/release/release.sh b/release/release.sh
index 8d38368b61ab..f6632880b3df 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -221,22 +221,22 @@ chroot_setup() {
mkdir -p ${CHROOTDIR}/usr
if [ -z "${SRC_UPDATE_SKIP}" ]; then
- if [ -d "${CHROOTDIR}/usr/src" ]; then
- cd ${CHROOTDIR}/usr/src && ${VCSUPDATE} && cd -
+ if [ -d "${CHROOTDIR}/usr/src/.git" ]; then
+ ${VCSUPDATE} -C ${CHROOTDIR}/usr/src
else
${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src
fi
fi
if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then
- if [ -d "${CHROOTDIR}/usr/doc" ]; then
- cd ${CHROOTDIR}/usr/doc && ${VCSUPDATE} && cd -
+ if [ -d "${CHROOTDIR}/usr/doc/.git" ]; then
+ ${VCSUPDATE} -C ${CHROOTDIR}/usr/doc
else
${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc
fi
fi
if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then
- if [ -d "${CHROOTDIR}/usr/ports" ]; then
- cd ${CHROOTDIR}/usr/ports && ${VCSUPDATE} && cd -
+ if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then
+ ${VCSUPDATE} -C ${CHROOTDIR}/usr/ports
else
${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports
fi