mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-30 05:29:52 +08:00
8db0c4d49b
This includes teaching methods that they now work with a symbolp PACKAGE, some more cleaning up, and some load-path adjustments now that a part of the code is in a subdirectory (methods). Also include some of the tests used to convince oneself that the refactoring didn't break any and all use cases for el-get, with some rough documentation about how to use them.
41 lines
1.4 KiB
EmacsLisp
41 lines
1.4 KiB
EmacsLisp
;;; el-get --- Manage the external elisp bits and pieces you depend upon
|
|
;;
|
|
;; Copyright (C) 2010-2011 Dimitri Fontaine
|
|
;;
|
|
;; Author: Dimitri Fontaine <dim@tapoueh.org>
|
|
;; URL: http://www.emacswiki.org/emacs/el-get
|
|
;; GIT: https://github.com/dimitri/el-get
|
|
;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/
|
|
;;
|
|
;; This file is NOT part of GNU Emacs.
|
|
;;
|
|
;; Install
|
|
;; Please see the README.asciidoc file from the same distribution
|
|
|
|
(require 'el-get-git)
|
|
|
|
(defcustom el-get-emacsmirror-base-url
|
|
"http://github.com/emacsmirror/%s.git"
|
|
"The base URL where to fetch :emacsmirror packages. Consider using
|
|
\"git://github.com/emacsmirror/%s.git\"."
|
|
:group 'el-get
|
|
:type '(choice (const "http://github.com/emacsmirror/%s.git")
|
|
(const "https://github.com/emacsmirror/%s.git")
|
|
(const "git://github.com/emacsmirror/%s.git")
|
|
string))
|
|
|
|
;;
|
|
;; emacsmirror support
|
|
;;
|
|
(defun el-get-emacsmirror-clone (package url post-install-fun)
|
|
(let* ((source (el-get-package-def package))
|
|
(pkgname (or (plist-get source :pkgname) (el-get-as-string package)))
|
|
(url (or url (format el-get-emacsmirror-base-url pkgname))))
|
|
(el-get-git-clone package url post-install-fun)))
|
|
|
|
(el-get-register-method
|
|
:emacsmirror #'el-get-emacsmirror-clone #'el-get-git-pull #'el-get-rmdir
|
|
#'el-get-git-clone-hook)
|
|
|
|
(provide 'el-get-emacsmirror)
|