update elpaca-bootstrap file according to new readme, for things to come
This commit is contained in:
parent
780f8e63ce
commit
f7bbb7c66c
@ -4,33 +4,37 @@
|
|||||||
;; Taken from https://github.com/progfolio/elpaca
|
;; Taken from https://github.com/progfolio/elpaca
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(declare-function elpaca-generate-autoloads "elpaca")
|
|
||||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
(when-let ((elpaca-repo (expand-file-name "repos/elpaca/" elpaca-directory))
|
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||||
(elpaca-build (expand-file-name "elpaca/" elpaca-builds-directory))
|
:ref nil
|
||||||
(elpaca-target (if (file-exists-p elpaca-build) elpaca-build elpaca-repo))
|
:build (:not elpaca--activate-package)))
|
||||||
(elpaca-url "https://www.github.com/progfolio/elpaca.git")
|
(when-let ((repo (expand-file-name "repos/elpaca/" elpaca-directory))
|
||||||
((add-to-list 'load-path elpaca-target))
|
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||||
((not (file-exists-p elpaca-repo)))
|
(order (cdr elpaca-order))
|
||||||
|
((add-to-list 'load-path (if (file-exists-p build) build repo)))
|
||||||
|
((not (file-exists-p repo)))
|
||||||
(buffer (get-buffer-create "*elpaca-bootstrap*")))
|
(buffer (get-buffer-create "*elpaca-bootstrap*")))
|
||||||
(condition-case-unless-debug err
|
(condition-case-unless-debug err
|
||||||
(progn
|
(if-let (((pop-to-buffer buffer '((display-buffer-reuse-window
|
||||||
(unless (zerop (call-process "git" nil buffer t "clone" elpaca-url elpaca-repo))
|
display-buffer-same-window))))
|
||||||
(error "%s" (list (with-current-buffer buffer (buffer-string)))))
|
((zerop (call-process "git" nil buffer t "clone"
|
||||||
(byte-recompile-directory elpaca-repo 0 'force)
|
(plist-get order :repo) repo)))
|
||||||
(require 'elpaca)
|
(default-directory repo)
|
||||||
(elpaca-generate-autoloads "elpaca" elpaca-repo)
|
((zerop (call-process "git" nil buffer t "checkout"
|
||||||
(kill-buffer buffer))
|
(or (plist-get order :ref) "--")))))
|
||||||
|
(progn
|
||||||
|
(byte-recompile-directory repo 0 'force)
|
||||||
|
(require 'elpaca)
|
||||||
|
(and (fboundp 'elpaca-generate-autoloads)
|
||||||
|
(elpaca-generate-autoloads "elpaca" repo))
|
||||||
|
(kill-buffer buffer))
|
||||||
|
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||||
((error)
|
((error)
|
||||||
(delete-directory elpaca-directory 'recursive)
|
(warn "%s" err)
|
||||||
(with-current-buffer buffer
|
(delete-directory repo 'recursive))))
|
||||||
(goto-char (point-max))
|
|
||||||
(insert (format "\n%S" err))
|
|
||||||
(display-buffer buffer)))))
|
|
||||||
(require 'elpaca-autoloads)
|
(require 'elpaca-autoloads)
|
||||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||||
(elpaca (elpaca :host github :repo "progfolio/elpaca"))
|
(elpaca `(,@elpaca-order))
|
||||||
|
|
||||||
(provide 'elpaca-bootstrap)
|
(provide 'elpaca-bootstrap)
|
||||||
;;; elpaca-bootstrap.el ends here
|
;;; elpaca-bootstrap.el ends here
|
||||||
|
Loading…
Reference in New Issue
Block a user