release: fix ports checkout if /usr/ports does not exist

Reported by:	Yasuhiro Kimura
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Glen Barber 2021-05-12 12:08:59 -04:00
parent 69b6abb7b2
commit c0dbc49ab3

View file

@ -213,6 +213,8 @@ chroot_setup() {
if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then
if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then
git -C ${CHROOTDIR}/usr/ports pull -q
else
${VCSCMD} ${PORT} -b ${PORTBRANCH} ${CHROOTDIR}/usr/ports
fi
fi