mirror of
https://github.com/correl/melpa.git
synced 2025-04-11 09:11:12 -09:00
Added ability to checkout wiki-based packages.
This commit is contained in:
parent
2a03ca3023
commit
2fe4f63179
2 changed files with 21 additions and 3 deletions
|
@ -63,6 +63,18 @@
|
||||||
:group 'package-build
|
:group 'package-build
|
||||||
:type 'string)
|
: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)
|
(defun package-build-checkout-darcs (repo dir)
|
||||||
"checkout a darcs package"
|
"checkout a darcs package"
|
||||||
(with-current-buffer (get-buffer-create "*package-build-checkout*")
|
(with-current-buffer (get-buffer-create "*package-build-checkout*")
|
||||||
|
@ -280,6 +292,9 @@
|
||||||
(repo-url (plist-get cfg :url))
|
(repo-url (plist-get cfg :url))
|
||||||
(version
|
(version
|
||||||
(cond
|
(cond
|
||||||
|
((eq repo-type 'wiki)
|
||||||
|
(print 'EmacsWiki)
|
||||||
|
(package-build-checkout-wiki repo-url pkg-cwd))
|
||||||
((eq repo-type 'svn)
|
((eq repo-type 'svn)
|
||||||
(print 'Subversion)
|
(print 'Subversion)
|
||||||
(package-build-checkout-svn repo-url pkg-cwd))
|
(package-build-checkout-svn repo-url pkg-cwd))
|
||||||
|
@ -293,6 +308,8 @@
|
||||||
(files (package-expand-file-list pkg-cwd (plist-get cfg :files)))
|
(files (package-expand-file-list pkg-cwd (plist-get cfg :files)))
|
||||||
(default-directory package-build-working-dir))
|
(default-directory package-build-working-dir))
|
||||||
(cond
|
(cond
|
||||||
|
((not version)
|
||||||
|
(print (format "Unable to check out repository: %s" repo-url)))
|
||||||
((= 1 (length files))
|
((= 1 (length files))
|
||||||
(let* ((pkgsrc (expand-file-name (car files) pkg-cwd))
|
(let* ((pkgsrc (expand-file-name (car files) pkg-cwd))
|
||||||
(pkgdst (expand-file-name
|
(pkgdst (expand-file-name
|
||||||
|
|
5
pkglist
5
pkglist
|
@ -20,8 +20,9 @@
|
||||||
:fetcher git
|
:fetcher git
|
||||||
:files ("deft.el"))
|
:files ("deft.el"))
|
||||||
(dired+
|
(dired+
|
||||||
:url "git://github.com/emacsmirror/dired-plus.git"
|
:url "http://www.emacswiki.org/emacs/download/dired+.el"
|
||||||
:fetcher git)
|
:fetcher wiki
|
||||||
|
:files ("dired+.el"))
|
||||||
(elisp-slime-nav
|
(elisp-slime-nav
|
||||||
:url "https://github.com/purcell/elisp-slime-nav.git"
|
:url "https://github.com/purcell/elisp-slime-nav.git"
|
||||||
:fetcher git
|
:fetcher git
|
||||||
|
|
Loading…
Add table
Reference in a new issue