summaryrefslogtreecommitdiff
path: root/eclass/git-2.eclass
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-04-16 19:18:53 +0200
committerTomas Chvatal <scarabeus@gentoo.org>2011-04-16 19:18:53 +0200
commitb01f14eb604d82f5e46f66603278137d08eb2bef (patch)
tree580fdef0a0796c394e5ec0271ad6114f743ce18f /eclass/git-2.eclass
parent52acf31d48b5ae516ec2b1f7d9eb23d4d89dbac3 (diff)
downloadkde-b01f14eb604d82f5e46f66603278137d08eb2bef.tar.gz
kde-b01f14eb604d82f5e46f66603278137d08eb2bef.tar.bz2
kde-b01f14eb604d82f5e46f66603278137d08eb2bef.zip
[git-2] allow redefining complete GIT_DIR if really required.
Diffstat (limited to 'eclass/git-2.eclass')
-rw-r--r--eclass/git-2.eclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass
index 7c46b230c43..8943ffa7a2d 100644
--- a/eclass/git-2.eclass
+++ b/eclass/git-2.eclass
@@ -53,6 +53,12 @@ git-2_init_variables() {
# Usefull when upstream don't have master branch.
: ${EGIT_MASTER:=master}
+ # @ECLASS-VARIABLE: EGIT_DIR
+ # @DESCRIPTION:
+ # Directory where we want to store the git data.
+ # This should not be overriden unless really required.
+ # @DEFAULT: ${EGIT_STORE_DIR}/${EGIT_REPO_URI##*/}
+
# @ECLASS-VARIABLE: EGIT_REPO_URI
# @DESCRIPTION:
# URI for the repository
@@ -193,8 +199,11 @@ git-2_prepare_storedir() {
addwrite "${EGIT_STORE_DIR}"
# calculate the proper store dir for data
[[ -z ${EGIT_REPO_URI##*/} ]] && EGIT_REPO_URI="${EGIT_REPO_URI%/}"
- clone_dir="${EGIT_REPO_URI##*/}"
- export EGIT_DIR="${EGIT_STORE_DIR}/${clone_dir}"
+ if [[ -z ${EGIT_DIR} ]]; then
+ clone_dir=${EGIT_REPO_URI##*/}
+ EGIT_DIR=${EGIT_STORE_DIR}/${clone_dir}
+ fi
+ export EGIT_DIR=${EGIT_DIR}
debug-print "${FUNCNAME}: Storing the repo into \"${EGIT_DIR}\"."
}