Author: ZHANG Weiyi dochang@gmail.com
Version: 0.4.0
URL: https://github.com/dochang/elpa-clone
Mirror an ELPA archive into a directory.
- Emacs 24.4 or later
- cl-lib
- rsync (optional, but recommended)
elpa-clone is available on MELPA and el-get.
To install elpa-clone from git repository, clone the repo, then add the
repo dir into load-path.
To clone an ELPA archive http://host/elpa into /path/to/elpa, invoke
elpa-clone:
(elpa-clone "http://host/elpa" "/path/to/elpa")
elpa-clone can also be invoked via M-x.
You can customize download interval via elpa-clone-download-interval. But
note that the real interval is (max elpa-clone-download-interval 5).
Some ELPA archives can more efficiently be cloned using rsync:
(elpa-clone "elpa.gnu.org::elpa/" "/path/to/elpa")
(elpa-clone "rsync://melpa.org/packages/" "/path/to/elpa")
(elpa-clone "rsync://stable.melpa.org/packages/" "/path/to/elpa")
Currently, only the following archives support rsync:
- GNU ELPA
- MELPA
- MELPA Stable
By default, elpa-clone selects the appropriate sync method based on the
upstream url, but you can also specify the method you want:
(elpa-clone "foo/" "bar/" :sync-method 'rsync)
(elpa-clone "foo::bar/" "/path/to/elpa" :sync-method 'local)
(elpa-clone "rsync://foo/bar/" "/path/to/elpa" :sync-method 'url)
Available methods are:
rsync: use rsync (recommended)url: use theurllibrarylocal: treat upstream as a local directorynil: choose a method based on upstream
elpa-clone will NOT overwrite existing packages but will clean
outdated packages before downloading new packages. If a package file is
broken, remove the file and call elpa-clone again.
GPLv3
Converted from elpa-clone.el by el2markdown.