mirror of
https://github.com/correl/melpa.git
synced 2024-11-14 19:19:32 +00:00
Group the -build-checkout- functions together
This commit is contained in:
parent
c070959b20
commit
ae4549fa16
1 changed files with 16 additions and 16 deletions
|
@ -63,22 +63,6 @@
|
|||
:group 'package-build
|
||||
:type 'string)
|
||||
|
||||
(defun package-build-checkout-wiki (name config 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* ((filename (or (car (plist-get config :files))
|
||||
(format "%s.el" name)))
|
||||
(default-directory dir)
|
||||
(download-url (format "http://www.emacswiki.org/emacs/download/%s" filename))
|
||||
(wiki-url (format "http://www.emacswiki.org/emacs/%s" filename)))
|
||||
(url-copy-file download-url filename t)
|
||||
(with-current-buffer (url-retrieve-synchronously wiki-url)
|
||||
(package-build-find-parse-time
|
||||
"Last edited \\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\} [A-Z]\\{3\\}\\)")))))
|
||||
|
||||
(defun package-build-find-parse-time (regex)
|
||||
"Find REGEX in current buffer and format as a proper time version."
|
||||
(format-time-string
|
||||
|
@ -103,6 +87,22 @@ In turn, this function uses the :fetcher option in the config to choose a
|
|||
(funcall (intern (format "package-build-checkout-%s" repo-type))
|
||||
name config cwd)))
|
||||
|
||||
(defun package-build-checkout-wiki (name config 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* ((filename (or (car (plist-get config :files))
|
||||
(format "%s.el" name)))
|
||||
(default-directory dir)
|
||||
(download-url (format "http://www.emacswiki.org/emacs/download/%s" filename))
|
||||
(wiki-url (format "http://www.emacswiki.org/emacs/%s" filename)))
|
||||
(url-copy-file download-url filename t)
|
||||
(with-current-buffer (url-retrieve-synchronously wiki-url)
|
||||
(package-build-find-parse-time
|
||||
"Last edited \\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} [0-9]\\{2\\}:[0-9]\\{2\\} [A-Z]\\{3\\}\\)")))))
|
||||
|
||||
(defun package-build-checkout-darcs (name config dir)
|
||||
"checkout a darcs package"
|
||||
(let ((repo (plist-get config :url)))
|
||||
|
|
Loading…
Reference in a new issue