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

Diff of /eclass/subversion.eclass

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

Revision 1.5 Revision 1.6
1# Copyright 1999-2004 Gentoo Technologies, Inc. 1# Copyright 1999-2004 Gentoo Technologies, Inc.
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.5 2004/02/27 09:00:25 hattya Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/subversion.eclass,v 1.6 2004/03/01 16:34:42 hattya Exp $
4 4
5## --------------------------------------------------------------------------- # 5## --------------------------------------------------------------------------- #
6# Author: Akinori Hattori <hattya@gentoo.org> 6# Author: Akinori Hattori <hattya@gentoo.org>
7# 7#
8# The subversion eclass is written to fetch the software sources from 8# The subversion eclass is written to fetch the software sources from
103 # -userpriv 103 # -userpriv
104 addwrite "/root/.subversion" 104 addwrite "/root/.subversion"
105 105
106 if [ ! -d "${ESVN_STORE_DIR}" ]; then 106 if [ ! -d "${ESVN_STORE_DIR}" ]; then
107 mkdir -p "${ESVN_STORE_DIR}" || die "subversion.eclass: can't mkdir ${ESVN_STORE_DIR}." 107 mkdir -p "${ESVN_STORE_DIR}" || die "subversion.eclass: can't mkdir ${ESVN_STORE_DIR}."
108 chmod -f o+rw "${ESVN_STORE_DIR}" || die "subversion.eclass: can't chmod ${ESVN_STORE_DIR}."
108 einfo "created store directory: ${ESVN_STORE_DIR}" 109 einfo "created store directory: ${ESVN_STORE_DIR}"
109 einfo 110 einfo
110 fi 111 fi
111 112
112 cd "${ESVN_STORE_DIR}" 113 cd "${ESVN_STORE_DIR}"
124 einfo "subversion check out start -->" 125 einfo "subversion check out start -->"
125 einfo 126 einfo
126 einfo "check out from: ${ESVN_REPO_URI}" 127 einfo "check out from: ${ESVN_REPO_URI}"
127 128
128 mkdir -p "${ESVN_PROJECT}" || die "subversion.eclass: can't mkdir ${ESVN_PROJECT}." 129 mkdir -p "${ESVN_PROJECT}" || die "subversion.eclass: can't mkdir ${ESVN_PROJECT}."
130 chmod -f o+rw "${ESVN_PROJECT}" || die "subversion.eclass: can't chmod ${ESVN_PROJECT}."
129 cd "${ESVN_PROJECT}" 131 cd "${ESVN_PROJECT}"
130
131 ${ESVN_FETCH_CMD} "${ESVN_REPO_URI}" || die "subversion.eclass: can't fetch from ${ESVN_REPO_URI}." 132 ${ESVN_FETCH_CMD} "${ESVN_REPO_URI}" || die "subversion.eclass: can't fetch from ${ESVN_REPO_URI}."
132 einfo " stored in: ${ESVN_STORE_DIR}/${ESVN_CO_DIR}" 133 einfo " stored in: ${ESVN_STORE_DIR}/${ESVN_CO_DIR}"
133 134
134 else 135 else
135 # update working copy 136 # update working copy
140 cd "${ESVN_CO_DIR}" 141 cd "${ESVN_CO_DIR}"
141 ${ESVN_UPDATE_CMD} || die "subversion.eclass: can't update from ${ESVN_REPO_URI}." 142 ${ESVN_UPDATE_CMD} || die "subversion.eclass: can't update from ${ESVN_REPO_URI}."
142 einfo " updated in: ${ESVN_STORE_DIR}/${ESVN_CO_DIR}" 143 einfo " updated in: ${ESVN_STORE_DIR}/${ESVN_CO_DIR}"
143 fi 144 fi
144 145
145 if [ $(whoami) != "portage" ]; then 146 # permission fix
146 chmod -R o+rw ${ESVN_STORE_DIR} || die "subversion.eclass: can't chmod ${ESVN_STORE_DIR}." 147 chmod -Rf o+rw .
147 fi
148 148
149 # copy to the ${WORKDIR} 149 # copy to the ${WORKDIR}
150 cp -Rf "${ESVN_STORE_DIR}/${ESVN_CO_DIR}" "${WORKDIR}/${P}" || die "subversion.eclass: can't copy to ${WORKDIR}/${P}." 150 cp -Rf "${ESVN_STORE_DIR}/${ESVN_CO_DIR}" "${WORKDIR}/${P}" || die "subversion.eclass: can't copy to ${WORKDIR}/${P}."
151 einfo 151 einfo
152 152

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20