/[gentoo-x86]/eclass/git-2.eclass
Gentoo

Diff of /eclass/git-2.eclass

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

Revision 1.17 Revision 1.18
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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/git-2.eclass,v 1.17 2011/09/23 13:57:15 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.18 2011/09/23 13:57:28 mgorny Exp $
4 4
5# @ECLASS: git-2.eclass 5# @ECLASS: git-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Donnie Berkholz <dberkholz@gentoo.org> 7# Donnie Berkholz <dberkholz@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
288 local repo_uri 288 local repo_uri
289 289
290 EGIT_REPO_URI_SELECTED="" 290 EGIT_REPO_URI_SELECTED=""
291 for repo_uri in ${EGIT_REPO_URI}; do 291 for repo_uri in ${EGIT_REPO_URI}; do
292 debug-print "${FUNCNAME}: git clone ${EGIT_LOCAL_OPTIONS} \"${repo_uri}\" \"${EGIT_DIR}\"" 292 debug-print "${FUNCNAME}: git clone ${EGIT_LOCAL_OPTIONS} \"${repo_uri}\" \"${EGIT_DIR}\""
293 git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}" 293 if git clone ${EGIT_LOCAL_OPTIONS} "${repo_uri}" "${EGIT_DIR}"; then
294 if [[ $? -eq 0 ]]; then
295 # global variable containing the repo_name we will be using 294 # global variable containing the repo_name we will be using
296 debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\"" 295 debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
297 EGIT_REPO_URI_SELECTED="${repo_uri}" 296 EGIT_REPO_URI_SELECTED="${repo_uri}"
298 break 297 break
299 fi 298 fi
324 for repo_uri in ${EGIT_REPO_URI}; do 323 for repo_uri in ${EGIT_REPO_URI}; do
325 # git urls might change, so reset it 324 # git urls might change, so reset it
326 git config remote.origin.url "${repo_uri}" 325 git config remote.origin.url "${repo_uri}"
327 326
328 debug-print "${EGIT_UPDATE_CMD}" 327 debug-print "${EGIT_UPDATE_CMD}"
329 ${EGIT_UPDATE_CMD} > /dev/null 328 if ${EGIT_UPDATE_CMD} > /dev/null; then
330 if [[ $? -eq 0 ]]; then
331 # global variable containing the repo_name we will be using 329 # global variable containing the repo_name we will be using
332 debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\"" 330 debug-print "${FUNCNAME}: EGIT_REPO_URI_SELECTED=\"${repo_uri}\""
333 EGIT_REPO_URI_SELECTED="${repo_uri}" 331 EGIT_REPO_URI_SELECTED="${repo_uri}"
334 break 332 break
335 fi 333 fi

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20