Skip to content
Newer
Older
100644 66 lines (58 sloc) 1.93 KB
0433ca0 @dimitri Refactoring it all: a beginning. No time for testing yet, just showin…
authored Sep 20, 2011
1 ;;; el-get --- Manage the external elisp bits and pieces you depend upon
2 ;;
3 ;; Copyright (C) 2010-2011 Dimitri Fontaine
4 ;;
5 ;; Author: Dimitri Fontaine <dim@tapoueh.org>
6 ;; URL: http://www.emacswiki.org/emacs/el-get
7 ;; GIT: https://github.com/dimitri/el-get
8 ;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/
9 ;;
10 ;; This file is NOT part of GNU Emacs.
11 ;;
12 ;; Install
13 ;; Please see the README.asciidoc file from the same distribution
14
15 (require 'el-get-core)
16
17 (defcustom el-get-bzr-branch-hook nil
18 "Hook run after bzr branch."
19 :group 'el-get
20 :type 'hook)
21
22 (defun el-get-bzr-branch (package url post-install-fun)
23 "Branch a given bzr PACKAGE following the URL using bzr."
24 (let* ((bzr-executable (el-get-executable-find "bzr"))
8db0c4d @dimitri Fix the refactoring so that it actually works.
authored Sep 22, 2011
25 (pname (el-get-as-string package))
26 (name (format "*bzr branch %s*" package))
27 (ok (format "Package %s installed" package))
28 (ko (format "Could not install package %s." package)))
0433ca0 @dimitri Refactoring it all: a beginning. No time for testing yet, just showin…
authored Sep 20, 2011
29 (el-get-start-process-list
30 package
31 `((:command-name ,name
32 :buffer-name ,name
33 :default-directory ,el-get-dir
34 :program ,bzr-executable
8db0c4d @dimitri Fix the refactoring so that it actually works.
authored Sep 22, 2011
35 :args ("branch" ,url ,pname)
0433ca0 @dimitri Refactoring it all: a beginning. No time for testing yet, just showin…
authored Sep 20, 2011
36 :message ,ok
37 :error ,ko))
38 post-install-fun)))
39
40 (defun el-get-bzr-pull (package url post-update-fun)
41 "bzr pull the package."
42 (let* ((bzr-executable (el-get-executable-find "bzr"))
43 (pdir (el-get-package-directory package))
44 (name (format "*bzr pull %s*" package))
45 (ok (format "Pulled package %s." package))
46 (ko (format "Could not update package %s." package)))
47
48 (el-get-start-process-list
49 package
50 `((:command-name ,name
51 :buffer-name ,name
52 :default-directory ,pdir
53 :program ,bzr-executable
54 :args ( "pull" )
55 :message ,ok
56 :error ,ko))
57 post-update-fun)))
58
3a5e6ac @DarwinAwardWinner Update all el-get methods to declare using keywords
DarwinAwardWinner authored Feb 2, 2012
59 (el-get-register-method :bzr
60 :install #'el-get-bzr-branch
61 :update #'el-get-bzr-pull
62 :remove #'el-get-rmdir
63 :install-hook el-get-bzr-branch-hook)
0433ca0 @dimitri Refactoring it all: a beginning. No time for testing yet, just showin…
authored Sep 20, 2011
64
65 (provide 'el-get-bzr)
Something went wrong with that request. Please try again.