summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2011-02-07 20:59:40 +0000
committerUlrich Müller <ulm@gentoo.org>2011-02-07 20:59:40 +0000
commit977659b92ea8af5cf6c02f905fe48e6fd4c7eb4f (patch)
treeeeaf670b34683fb3dff795990e0f7db1321befa3 /eclass
parentSmall fixes. (diff)
downloademacs-977659b92ea8af5cf6c02f905fe48e6fd4c7eb4f.tar.gz
emacs-977659b92ea8af5cf6c02f905fe48e6fd4c7eb4f.tar.bz2
emacs-977659b92ea8af5cf6c02f905fe48e6fd4c7eb4f.zip
Move old checkout out of the way, instead of removing it.
svn path=/emacs-overlay/; revision=1609
Diffstat (limited to 'eclass')
-rw-r--r--eclass/bzr.eclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
index d31a935..e91978e 100644
--- a/eclass/bzr.eclass
+++ b/eclass/bzr.eclass
@@ -206,8 +206,12 @@ bzr_fetch() {
# with an older version of bzr.eclass).
if [[ ${EBZR_FETCH_CMD} != *checkout* && -d ${repo_dir}/.bzr/checkout ]]
then
- ewarn "removing old bzr checkout"
- rm -rf "${repo_dir}"
+ local tmpname=$(mktemp -u "${repo_dir}._old_.XXXXXX")
+ ewarn "checkout from old version of bzr.eclass found, moving it to:"
+ ewarn "${tmpname}"
+ ewarn "you may manually remove it"
+ mv "${repo_dir}" "${tmpname}" \
+ || die "${EBZR}: can't move old checkout out of the way"
fi
if [[ ! -d ${branch_dir}/.bzr ]]; then