diff options
author | Ulrich Müller <ulm@gentoo.org> | 2011-02-07 20:59:40 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2011-02-07 20:59:40 +0000 |
commit | 977659b92ea8af5cf6c02f905fe48e6fd4c7eb4f (patch) | |
tree | eeaf670b34683fb3dff795990e0f7db1321befa3 /eclass | |
parent | Small fixes. (diff) | |
download | emacs-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.eclass | 8 |
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 |