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

Diff of /eclass/git.eclass

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

Revision 1.12 Revision 1.13
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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/Attic/git.eclass,v 1.12 2008/06/15 17:47:57 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/git.eclass,v 1.13 2008/06/16 07:51:00 zlin Exp $
4 4
5## --------------------------------------------------------------------------- # 5## --------------------------------------------------------------------------- #
6# subversion.eclass author: Akinori Hattori <hattya@gentoo.org> 6# subversion.eclass author: Akinori Hattori <hattya@gentoo.org>
7# modified for git by Donnie Berkholz <spyderous@gentoo.org> 7# modified for git by Donnie Berkholz <spyderous@gentoo.org>
8# improved by Fernando J. Pereda <ferdy@gentoo.org> 8# improved by Fernando J. Pereda <ferdy@gentoo.org>
188 [[ -z ${EGIT_REPO_URI##*/} ]] && EGIT_REPO_URI="${EGIT_REPO_URI%/}" 188 [[ -z ${EGIT_REPO_URI##*/} ]] && EGIT_REPO_URI="${EGIT_REPO_URI%/}"
189 EGIT_CLONE_DIR="${EGIT_PROJECT}" 189 EGIT_CLONE_DIR="${EGIT_PROJECT}"
190 190
191 debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\"" 191 debug-print "${FUNCNAME}: EGIT_OPTIONS = \"${EGIT_OPTIONS}\""
192 192
193 mkdir -p "${S}"
193 export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" 194 export GIT_DIR="${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}"
195 export GIT_WORK_TREE="${S}"
194 196
195 if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then 197 if [[ ! -d ${EGIT_CLONE_DIR} ]] ; then
196 # first clone 198 # first clone
197 einfo "git clone start -->" 199 einfo "git clone start -->"
198 einfo " repository: ${EGIT_REPO_URI}" 200 einfo " repository: ${EGIT_REPO_URI}"
233 fi 235 fi
234 236
235 einfo " committish: ${EGIT_TREE}" 237 einfo " committish: ${EGIT_TREE}"
236 238
237 # export to the ${WORKDIR} 239 # export to the ${WORKDIR}
238 mkdir -p "${S}" 240 git checkout -f ${EGIT_TREE}
239 git archive --format=tar ${EGIT_TREE} | ( cd "${S}" ; tar xf - )
240 241
241 echo ">>> Unpacked to ${S}" 242 echo ">>> Unpacked to ${S}"
242 243
243} 244}
244 245

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20