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

Diff of /eclass/git-r3.eclass

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

Revision 1.18 Revision 1.19
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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-r3.eclass,v 1.18 2013/10/14 20:30:00 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.19 2013/10/26 06:19:13 mgorny Exp $
4 4
5# @ECLASS: git-r3.eclass 5# @ECLASS: git-r3.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Michał Górny <mgorny@gentoo.org> 7# Michał Górny <mgorny@gentoo.org>
8# @BLURB: Eclass for fetching and unpacking git repositories. 8# @BLURB: Eclass for fetching and unpacking git repositories.
513 local commit=$(git rev-parse "${local_ref}:${path}") 513 local commit=$(git rev-parse "${local_ref}:${path}")
514 514
515 if [[ ! ${commit} ]]; then 515 if [[ ! ${commit} ]]; then
516 die "Unable to get commit id for submodule ${subname}" 516 die "Unable to get commit id for submodule ${subname}"
517 fi 517 fi
518 if [[ ${url} == ./* || ${url} == ../* ]]; then
519 local subrepos=( "${repos[@]/%//${url}}" )
520 else
521 local subrepos=( "${url}" )
522 fi
518 523
519 git-r3_fetch "${url}" "${commit}" "${local_id}/${subname}" 524 git-r3_fetch "${subrepos[*]}" "${commit}" "${local_id}/${subname}"
520 525
521 submodules=( "${submodules[@]:3}" ) # shift 526 submodules=( "${submodules[@]:3}" ) # shift
522 done 527 done
523 fi 528 fi
524} 529}
613 while [[ ${submodules[@]} ]]; do 618 while [[ ${submodules[@]} ]]; do
614 local subname=${submodules[0]} 619 local subname=${submodules[0]}
615 local url=${submodules[1]} 620 local url=${submodules[1]}
616 local path=${submodules[2]} 621 local path=${submodules[2]}
617 622
623 if [[ ${url} == ./* || ${url} == ../* ]]; then
624 url=${repos[0]%%/}/${url}
625 fi
626
618 git-r3_checkout "${url}" "${GIT_WORK_TREE}/${path}" \ 627 git-r3_checkout "${url}" "${GIT_WORK_TREE}/${path}" \
619 "${local_id}/${subname}" 628 "${local_id}/${subname}"
620 629
621 submodules=( "${submodules[@]:3}" ) # shift 630 submodules=( "${submodules[@]:3}" ) # shift
622 done 631 done

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

  ViewVC Help
Powered by ViewVC 1.1.20