1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 Gentoo Foundation |
2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.8 2010/03/05 09:35:23 fauli Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/bzr.eclass,v 1.9 2010/07/01 09:23:37 fauli Exp $ |
4 | # |
4 | # |
5 | # @ECLASS: bzr.eclass |
5 | # @ECLASS: bzr.eclass |
6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
7 | # Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>, |
7 | # Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>, |
8 | # Ulrich Mueller <ulm@gentoo.org>, |
8 | # Ulrich Mueller <ulm@gentoo.org>, |
… | |
… | |
210 | # Run bzr_initial_fetch() only if the branch has not been pulled |
210 | # Run bzr_initial_fetch() only if the branch has not been pulled |
211 | # before or if the existing local copy is a full checkout (as did |
211 | # before or if the existing local copy is a full checkout (as did |
212 | # an older version of bzr.eclass) |
212 | # an older version of bzr.eclass) |
213 | if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then |
213 | if [[ ! -d ${EBZR_BRANCH_DIR} ]] ; then |
214 | bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" |
214 | bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" |
215 | elif [[ ${EBZR_FETCH_CMD} == *lightweight* \ |
|
|
216 | && -d ${EBZR_BRANCH_DIR}/.bzr/repository ]]; then |
|
|
217 | einfo "Re-fetching the branch to save space..." |
|
|
218 | rm -rf "${EBZR_BRANCH_DIR}" |
|
|
219 | bzr_initial_fetch "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" |
|
|
220 | else |
215 | else |
221 | bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" |
216 | bzr_update "${EBZR_REPO_URI}" "${EBZR_BRANCH_DIR}" |
222 | fi |
217 | fi |
223 | |
218 | |
224 | cd "${EBZR_BRANCH_DIR}" |
219 | cd "${EBZR_BRANCH_DIR}" |