Added ability to checkout wiki-based packages.

This commit is contained in:
Donald Ephraim Curtis 2012-01-28 19:26:20 -06:00
parent 2a03ca3023
commit 2fe4f63179
2 changed files with 21 additions and 3 deletions

View file

@ -63,6 +63,18 @@
:group 'package-build
:type 'string)
(defun package-build-checkout-wiki (repo dir)
"checkout a package from the wiki"
(with-current-buffer (get-buffer-create "*package-build-checkout*")
(message dir)
(unless (file-exists-p dir)
(make-directory dir))
(let ((default-directory dir)
(filename (file-name-nondirectory repo)))
(url-copy-file repo filename t)
(format-time-string "%Y%m%d" (current-time)))))
(defun package-build-checkout-darcs (repo dir)
"checkout a darcs package"
(with-current-buffer (get-buffer-create "*package-build-checkout*")
@ -280,6 +292,9 @@
(repo-url (plist-get cfg :url))
(version
(cond
((eq repo-type 'wiki)
(print 'EmacsWiki)
(package-build-checkout-wiki repo-url pkg-cwd))
((eq repo-type 'svn)
(print 'Subversion)
(package-build-checkout-svn repo-url pkg-cwd))
@ -293,6 +308,8 @@
(files (package-expand-file-list pkg-cwd (plist-get cfg :files)))
(default-directory package-build-working-dir))
(cond
((not version)
(print (format "Unable to check out repository: %s" repo-url)))
((= 1 (length files))
(let* ((pkgsrc (expand-file-name (car files) pkg-cwd))
(pkgdst (expand-file-name

View file

@ -20,8 +20,9 @@
:fetcher git
:files ("deft.el"))
(dired+
:url "git://github.com/emacsmirror/dired-plus.git"
:fetcher git)
:url "http://www.emacswiki.org/emacs/download/dired+.el"
:fetcher wiki
:files ("dired+.el"))
(elisp-slime-nav
:url "https://github.com/purcell/elisp-slime-nav.git"
:fetcher git