/[gentoo-x86]/eclass/subversion.eclass
Gentoo

Diff of /eclass/subversion.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.50 Revision 1.51
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 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/subversion.eclass,v 1.50 2008/02/20 20:36:30 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.51 2008/02/20 22:28:49 zlin Exp $
4 4
5# @ECLASS: subversion.eclass 5# @ECLASS: subversion.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Akinori Hattori <hattya@gentoo.org> 7# Akinori Hattori <hattya@gentoo.org>
8# Bo ├śrsted Andresen <zlin@gentoo.org> 8# Bo ├śrsted Andresen <zlin@gentoo.org>
11# 11#
12# @BLURB: The subversion eclass is written to fetch software sources from subversion repositories 12# @BLURB: The subversion eclass is written to fetch software sources from subversion repositories
13# @DESCRIPTION: 13# @DESCRIPTION:
14# The subversion eclass provides functions to fetch, patch and bootstrap 14# The subversion eclass provides functions to fetch, patch and bootstrap
15# software sources from subversion repositories. 15# software sources from subversion repositories.
16#
17# You must define the ESVN_REPO_URI variable before inheriting this eclass.
18 16
19inherit eutils 17inherit eutils
20 18
21ESVN="${ECLASS}" 19ESVN="${ECLASS}"
22 20
150# destination - a check out path in S. 148# destination - a check out path in S.
151subversion_fetch() { 149subversion_fetch() {
152 local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")" 150 local repo_uri="$(subversion__get_repository_uri "${1:-${ESVN_REPO_URI}}")"
153 local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")" 151 local revision="$(subversion__get_peg_revision "${1:-${ESVN_REPO_URI}}")"
154 local S_dest="${2}" 152 local S_dest="${2}"
153
154 if [[ -z ${repo_uri} ]]; then
155 die "${ESVN}: ESVN_REPO_URI (or specified URI) is empty."
156 fi
155 157
156 [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}" 158 [[ -n "${ESVN_REVISION}" ]] && revision="${ESVN_REVISION}"
157 159
158 # check for the protocol 160 # check for the protocol
159 local protocol="${repo_uri%%:*}" 161 local protocol="${repo_uri%%:*}"

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

  ViewVC Help
Powered by ViewVC 1.1.20